Question
Currently the BookData class contains all the data about a book in the stores inventory. Now you will break the class into two classes: one
Currently the BookData class contains all the data about a book in the stores inventory. Now you will break the class into two classes: one that is base class containing on general data about a book, and another that is a derived class containing data about a book in inventory.
First simplify the BookData class so it contains only the general data about a book. Specifically, modify the BookData class so it contains only the following member variables and member functions:
Member Variables:
boookTitle
isbn
author
publisher
Member Functions:
setTitle
setISBN
setAuthor
setPub
Next you will create a new class named InventoryBook. This class will be derived from the BookData class, and will hold inventory-related data about a book. Specifically, this class will contains the following member variables and member function, which were removed from the original BookData class:
Page 2 of 3
Member Variables:
dateAdded
qtyOnHand
wholesale
retail
Member Function:
setDateAdded
SetQty
setWholeSale
setRetail
isEmpty
removeBook
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
Step: 1
Here is the code for the question Output shown for sample input Please dont forget to rate the ...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