Question 3 Consider Publishing Company Sells Books Audio Cds Works 18 Points Create Class Q43809164
c++Question 3: Consider a publishing company that sells both books and audio CDs of its works. (18 points) a) Create a class named Publication that has two private data attributes: title (string) and price (float) b) Create two classes named Book and CD that are derived from the class Publication. Class Book has an additional private data attribute named page_count (int) and class CD has an additional private data attribute named minutes (float) representing the CD playing time. Each class should have the following functions: input_data() function to input data from the user at the keyboard, print_data() to displaying it. c) Write a program an array of pointers of type Publication of size 2. Use this array to create objects of Book and CD classes dynamically. Ask the user to fill in data (e.g. title, price and page count for book object). Print the details of the objects in the array. Note: you may add any necessary to functions to class Publication Show transcribed image text Question 3: Consider a publishing company that sells both books and audio CDs of its works. (18 points) a) Create a class named Publication that has two private data attributes: title (string) and price (float) b) Create two classes named Book and CD that are derived from the class Publication. Class Book has an additional private data attribute named page_count (int) and class CD has an additional private data attribute named minutes (float) representing the CD playing time. Each class should have the following functions: input_data() function to input data from the user at the keyboard, print_data() to displaying it. c) Write a program an array of pointers of type Publication of size 2. Use this array to create objects of Book and CD classes dynamically. Ask the user to fill in data (e.g. title, price and page count for book object). Print the details of the objects in the array. Note: you may add any necessary to functions to class Publication
Expert Answer
Answer to Question 3: Consider a publishing company that sells both books and audio CDs of its works. (18 points) a) Create a clas…
OR