@@ -18,22 +18,22 @@ class Book: public Media{
1818 std::string author;
1919public:
2020 // Constructors
21- Book (std::string title, int times_consumed=def_times_consumed,
22- int user_rating=def_user_rating, std::string isbn=def_string_val,
23- std::string genre=def_string_val, std::string sub_genre = def_string_val,
24- std::string author=def_author);
21+ Book (const std::string& title, int times_consumed=def_times_consumed,
22+ int user_rating=def_user_rating, const std::string & isbn=def_string_val,
23+ const std::string & genre=def_string_val, const std::string & sub_genre = def_string_val,
24+ const std::string & author=def_author);
2525
2626 // Getters and Setters
2727 int get_times_read () const ;
28- std::string get_isbn () const ;
29- std::string get_genre () const ;
30- std::string get_sub_genre () const ;
31- std::string get_author () const ;
28+ const std::string & get_isbn () const ;
29+ const std::string & get_genre () const ;
30+ const std::string & get_sub_genre () const ;
31+ const std::string & get_author () const ;
3232 void set_times_read (int times_read);
33- void set_isbn (std::string isbn);
34- void set_genre (std::string genre);
35- void set_sub_genre (std::string sub_genre);
36- void set_author (std::string author);
33+ void set_isbn (const std::string & isbn);
34+ void set_genre (const std::string & genre);
35+ void set_sub_genre (const std::string & sub_genre);
36+ void set_author (const std::string & author);
3737
3838 // Custom Methods
3939 void increment_read (){Media::increment_times_consumed ();} // Wrapper method to provide more intuitive naming
0 commit comments