Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a program in C++, using the concept of Classes and Inheritence A publishing company that markets both hard copy book and ebook version

This is a program in C++, using the concept of Classes and Inheritence

A publishing company that markets both hard copy book and ebook version of its work. Create a class publication that store the title and price of a publication. From this class derive two classes: book, which add a page count and digital, which add a storage capacity in MG bytes. Each of these there classes should have a getdata() function to get its data from the user at the keyboard, and put a putdata() function to display its data.

Add a base class sales that hold an array of three floats so that it can record the dollar sales of particular publication for the last three months. Include a getData() function to get three sales amount from the user and a putdata() function to display the sales figures. Modify the book and digital classes so they are derived from both publication and sales. An object of class book or digital should input and output sales data along with its other data. Write a main function to create a book object and a digital object and test their input and output capabilities.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

How can we visually describe our goals?

Answered: 1 week ago