Warehouse C++ project continuation
Warehouse C++ project continuation
Objectives: inheritance, pointers, linked list, template class associations, operator overloading, and multiple file I/Os.
Continue from Project 3. Convert the existing Book class into an abstract base class with one public pure virtual method ‘getCoverType’ that returns a string for the cover type. Define two concrete derived classes from the Book class: HardcoverBook and PaperbackBook. Both derived classes implement the ‘getCoverType’ method from the base class. Modify the Warehouse class by adding a protected factory method ‘createBook_’, that reads in one set of book data from the input data stream and creates an instance of HardcoverBook or PaperbackBook depending on the input data. The program shall be able to process the same data format and produce the same outputs as in Project 3. The following class diagram illustrates the relationship between classes.
Note: The existing overloaded ‘>>’ operator defined in Book class from the previous project should be obsolete in this project, since the ‘createBook_’ method in the Warehouse class will be used to replace this functionality.
Source Files:
Book.h – contains the Book class declaration.
Book.cpp – contains the Book class implementation.
HardcoverBook.h – contains the Hardcover Book class declaration.
HardcoverBook.cpp – contains the Hardcover Book class implementation.
PaperbackBook.h – contains the Paperback Book class declaration.
PaperbackBook.cpp – contains the Paperback Book class implementation.
Warehouse.h – contains the Warehouse class declaration.
Warehouse.cpp – contains the Warehouse class implementation
LinkedList.h – contains the linked list template declaration and implementation
proj04.cpp – contains the main function and any global helper functions.
Project Submission:
Turn in the printout of the program and input data file with at least 3 successful run of your program
Capture the source code and output into a single file
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


