Question: In C++ please and i need it ASAP with EXACT output!!! Define a class, named, Book Info, that contains (1) three private members: title a

In C++ please and i need it ASAP with EXACT output!!! In C++ please and i need it ASAP with EXACT output!!! Definea class, named, Book Info, that contains (1) three private members: titlea string), author (a string), yearPublished an integer) (2) the corresponding accessorsand mutators for the above member variables in the public section string

Define a class, named, Book Info, that contains (1) three private members: title a string), author (a string), yearPublished an integer) (2) the corresponding accessors and mutators for the above member variables in the public section string getTitle(); -- return the title of a book string getAuthor(); -- return the author int getYearPublished(); -- return the year of publication void setTitle(string); -- set the title of a book via the input string parameter void setAuthor(string); -- set the author void set YearPublished (int); -- set the year of publication (3) two constructors the default constructor that sets both the title and author of the book as "Unknown" and the year of publication as 2021. an overloaded constructor that takes three parameters as input in the order of (string in Title, string in Author, int year) and initialize the corresponding member variables of the book object (4) a void printout() function that outputs the information of a book in the following format: Title: , Author: , Year of Publication: In the main() function, declare a BookInfo object and set its title to be "The Hobbit", its author to be J. R. R. Tolkien", and its yearPublished as "1937". Then output this book information as: Title: The Hobbit Author: J. R. R. Tolkien Year of Publication: 1937 Note: Please do not hard-code the above output. Instead, you should call the accessors to get the information for output. Complete the remaining code in main() as instructed (i.e., at places with "TODO" comments). The main is commented in the initial template to allow you to test the class first (Test cases 4-8). After passing these test cases, uncomment and complete the main. Uncommenting the main while your class is still incomplete will lead to compiler errors. Current file: main.cpp Load default template... 1 #include "RectangleClass.h" 2 3 int main() 4 { 5 // complete the main() function as instructed 6 7 * TODO: 8 Declare a BookInfo object and set its member variables as instructed, 9 then output the information of this book in the format as demonstrated 10 */ 11 12 13 /* The following code takes the input of three books' 14 information and search for the books by a particular author. 15 TODO: complete the code at specified position to make the following code work 16 */ 17 18 //TODO: UNCOMMENT CODE WHEN READY TO TEST : 19 20 /* 21 const int SIZE = 3; 22 23 //TODO: Declare a BookInfo array, named books 24 25 int i; 26 for (i=0; i> year; 37 //TODO: Set the book publication year 38 39 cin.ignore(); 40 + 41 42 string searchAuthor; 43 getline(cin, searchAuthor); 44 45 for (i=0; i 2 #include 3 using namespace std; 4 5 // define the BookInfo class below Current file: BookInfoClass.cpp Load default template... 1 //include the BookInfoClass.h here 2 3 //provide the implementation of the member functions of the BookInfo class below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!