Question: C++ Program Input: Enter name: Avengers Enter price: 5.40 Is media a book(b) or movie(m): m Enter rating: G Enter name: The Dark Knight Enter
C++ Program


Input:
Enter name: Avengers
Enter price: 5.40
Is media a book(b) or movie(m): m
Enter rating: G
Enter name: The Dark Knight
Enter price: 16.70
Is media a book(b) or movie(m): m
Enter rating: PG
Enter name: A Game of Thrones
Enter price: 9.50
Is media a book(b) or movie(m): b
Enter author: George Martin
Output:
Movie
Name is Avengers
Price is 5.40
Rating is G
Book
Name is A Game of Thrones
Price is 9.50
Author is George Martin
Movie
Name is The Dark Knight
Price is 16.70
Rating is PG
You will create an inheritance set of classes. Use proper rules for data types, class definitions, and inheritance (check input/output of data below). You will create a super media class that will define a general form of media. A media properties will consist of the name and price. The media should be able to construct itself out of the arguments sent to it, virtually print both data fields labeled (price to two decimal places) and overload the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
