Question: Serendipity 7: Creating a BookData Class For this chapter's assignment, you will begin a class declaration that will hold and manipu- late the information on
Serendipity 7: Creating a BookData Class



For this chapter's assignment, you will begin a class declaration that will hold and manipu- late the information on a single book. The class will be named BookData. Regardless of whether you are keeping your user functions in a single .cpp file or in a set of five separate cpp files, the class information belongs in its own files. Place the declaration for the BookData class in a file named bookdata.h, and the member function definitions in a file named bookdata. cpp. Place a #include "bookdata.h" directive in the bookdata. cpp file and in the mainmenu.cpp file. If you have designed your program as a multi-source file program, you will also need to place the # include "bookdata.h" directive in the cash ier.cpp, invmenu.cpp, bookinfo.cpp, and reports.cpp files. 1. Create the Class Declaration. Create a BookData class declaration with the following private members: bookTitle isbn author publisher dateAdded A string A string A string A string A string. The date should be stored in the form MM-DD-YYYY. For example, March 17, 2011 would be stored as 03-17-2011 An integer. A double. This member will hold the wholesale price of a book A double. This member will hold the retail price of a book A bool. This member will be set to true when the class object is empty, or false when the object's members hold data. (This member will be used when a book is deleted from inventory.) gtyOnHand wholesale retail empty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
