Question: C++, using inheritance and aggregation The main program and each class definition must be in separate files. Hard code test data in the program. Do

C++, using inheritance and aggregation The main program and each class definition must be in separate files. Hard code test data in the program. Do not enter test data when you run the program. Use functions to break your main program into components Add a comment at the beginning of all classes and functions to describe behavior. Part 1 Publication Class In your solution to homework 3, rename Book to Publication wherever it appears. Test your program to ensure it works properly.

I have added homework 3 at the end

Part 2 Book, Music, and Video classes Add a new Book class, as well as Music and Video classes. All three classes are derived from the Publication class. Add these member variables: Book class: pages format (hardcover, softcover, digital) Music class: duration (seconds) format (MP3, AAV, WAV) Video class: resolution (low, high, 4K) producer All three classes should have constructors, get, and set functions. Extend your main program to edit and display Publication and Person data, using this menu: 1) Display people 2) Display publications 3) Edit people 4) Edit publications 5) Check out publication 6) Check in publication 7) Quit

Page 2

Challenge (optional - 1 bonus point) Write a Date class with member variables year, month, and day, and member functions Constructor, setDate, and getDate overloaded - operator (calculates days between two Date objects) Add a menu option to enter todays date, and save the checkout date for each Publication. Publications may be checked out for 21 days. Extend your main program to determine if a Publication is overdue and display all overdue Publications.

Homework 3

Part 1 Person class Write a Person class that tracks subscribers to a library, with these member attributes: full name identifier (numeric) email address Person has these member functions: Constructor - initializes new object get and set function for each attribute Write a main program with these capabilities: Create test data for four people Display all people Edit attributes of an existing Person

Part 2 - Book Class Write a Book class that tracks all books in a library, with these member attributes: title author status - indicates if Book is checked out borrower the Person object that has currently checked out book, if any Book has these member functions: Constructor - initializes new object get and set function for borrower member variable checkOut - enables Person to check out Book - do not allow if book is checked out checkIn - enables Person to check in Book

Homework 3 Page 2 Extend your main program of part 1 with these capabilities: Create test data for six books display all books in library, along with name of borrower (if any) enable people to check books in and out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!