Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Define a class, named BookInfo, that contains (1) three private members: title (a string), author (a string), yearPublished (an integer) (2) the corresponding accessors
C++
Define a class, named BookInfo, 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 getAuthor0; -- retum 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 setYear Published (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 inAuthor, 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:Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started