Question: C++ Section 4 Write the code (40 pts) 1. Write the definition of class Book. Assume that all necessary libraries have al Use best practice.
Section 4 Write the code (40 pts) 1. Write the definition of class Book. Assume that all necessary libraries have al Use best practice. (20 pts) ready been included. Include the following: For data members: - a variable to hold the title of the book a variable to hold the author of the book - a variable to hold the number of pages of the book For member functions: - a constructor that takes no arguments; initializes the data members to default values - a function to set the title of the book (setTitle) - a function to set the author of the book (setAuthor) -a function to set the number of pages in the book (setPageCnt) - a function to return the title of the book (getTitle) - a function to return the author of the book (getAuthor) - a function to return the number of pages of the book (getPageCnt)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
