Question: We need to implement and use a class that manages books. This class is called Book and has the following attributes: 1. ISBN number

We need to implement and use a class that manages books. This 

We need to implement and use a class that manages books. This class is called "Book" and has the following attributes: 1. ISBN number (long) 2. Title (char *) 3. Pages Also, this 'Book' class should include: setters and getters for the above attributes. a default constructor that receive no parameters another constructor that receives three parameters: 1) ISBN and 2) Title, and 3) the number of pages. a destructor that delete all dynamically allocated objects. A method to set the content of a certain page. The method should receive the page number and the content to be added to the page. A method to get the content of a certain page. Note that 'Pages' data member is an array of type 'Page'; you should also build that class 'Page'. This Page class should contain at least one data member for the page number and another for the page content. In the main method, show how to create a new Book dynamically, calling the second constructor with suitable arguments. Also, in the main function, you should show how to add new pages with new content, and to print the content of existing pages.

Step by Step Solution

3.44 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

bookcpp include include using namespace std class Page private string pageContent int pageNum public ... View full answer

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 Programming Questions!