Question
Write a C++ program: A video shop needs to store information about the films it stocks. It has two types of film: video-cassettes and DVDs.
Write a C++ program:
A video shop needs to store information about the films it stocks. It has two types of film: video-cassettes and DVDs. Create a Film class that has two public data members title (a char*) and length (an int). Next create two classes called Cassette and DVD that are both derived from Film. The Cassette class should contain an extra public data member called condition (an enum type that can take the values perfect, good, average or poor). The DVD class should contain an extra public data member called region (an int). Both Cassette and DVD should have an extra public member function called Print that displays all data members. Write a short main function that creates objects to store information about two films and then displays the information to the screen: Titanic (a DVD, 180 minutes long, region 1) and Kezkaza Welafen (a video cassette, 100 minutes long, good condition).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started