View the step-by-step solution to:

This program will implement a class inheritance hierarchy and virtual functions. It will give you practice in combining two important aspects of OOP...

Homework 5 C++ Programing Homework Help, 

CS215 Intermediate C++ Programming

Home Work 5 (This lab was originally designed by Professor Paul Thor) Objective - The objective of this lab assignment is to write and test a complete OOP. This program will implement a class inheritance hierarchy and virtual functions. It will give you practice in combining two important aspects of OOP – namely, inheritance and polymorphism – in a single program. Specifications - This assignment will require you to use the C++ language to implement a simulation problem -- an area that OOP is especially adept at handling. Specifically, you are to simulate an Entertainment Media Collection that contains four different kinds of media: 1) AudioCassette, 2) AudioCD, 3) VideoVHS and, 4) VideoDVD. The user of the program will first give the media collection a name, and then will be able to, 1) Add a new media item to the collection, 2) Delete a media item from the collection, 3) Play a media item, 4) Fast-forward a media item to its end, 5) Rewind a media item to its beginning, 6) List the detailed information of a selected media item in the collection, 7) List all media titles, 8) Calculate the total investment in the media collection, 9) Calculate total playing time of the collection and 10) Terminate the simulation. The simulation continues until the user terminates it. This program will be interactive and menu driven. Your menu should be displayed as shown below: Welcome to <the interactively-entered media collection name> Media Collection Menu Select from the following choices: 1. Add Media Item to Collection 2. Delete Media Item from Collection 3. Play a Selection 4. Fast Forward a Selection 5. Rewind a Selection 6. List a Specific Media’s Details 7. List All Media Titles 8. Calculate Media Collection Investment 9. Calculate Total Playing Time of Collection 10. Terminate the Simulation Enter your Selection:
Background image of page 01
Preliminary Design: The diagram below shows the class relationships for the classes declared on the previous pages. Preliminary Design Diagram (a UML-like class model of the solution)
Background image of page 02
Show entire document
Sign up to view the entire interaction

Top Answer

View the full answer

#include &quot;AudioCassette.h&quot;
AudioCassette::AudioCassette() :
Media() {
this-&gt;CurrentSelection = 0;
this-&gt;NumberOfSelections = 0;
AudioCassette::AudioCassette(const string...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online