Expert answer: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
programCapture the source code and output into a single file
20171115110646warehouse.zip
20171115110646warehouse.zip
proj04.pdf
Unformatted Attachment Preview
California State Polytechnic University, Pomona
Computer Science 256-01, Fall 2017
Project 4 – Assigned November 21, 2017 – Due November 28, 2017 @8:00am
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 1 successful run of your
program in the beginning of the class on the due date.
Capture the source code and output into a single file named _proj04.txt
© T. Huang, Fall 2017
California State Polytechnic University, Pomona
Computer Science 256-01, Fall 2017
%
%
%
%
%
script _proj04.txt
cat
cat
^d
Submit _proj04.txt on Blackboard under CS256.01 -> Assignments ->
Projects -> Project 04 before the beginning of the class on November 28, 2017.
NOTE: Thursday, November 30, 2017 before end of class is the last day to submit any late
works to me. I will not accept any submission after that time.
© T. Huang, Fall 2017
…
Purchase answer to see full
attachment
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more