Chapter 8: Problem 16
Imagine a publishing company that markets both book and audiocassette versions of its works. Create a class publication that stores the title (a string) and price (type fl oat) of publication. From this class, derive two classes: book, which adds a page count (type int), and tape, which adds a playing time in minutes (type fl oat). Each of these three classes should have a getdata() function to get its data from the user as the keyboard, and a putdata() function to display its data. Write a main() program to test the book and tape classes by creating instance of them, asking the user to fi ll in data with getdata(), and then displaying data with putdata().
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.