Question: C + + Design a class Publication, which has the following member variables: title, number _ of _ pages, year, and price. Derive the following

C++ Design a class Publication, which has the following member variables: title,
number_of_pages, year, and price. Derive the following two classes from this class:
Book class adds a member variable author.
Magazine class adds member variables month and yearly_subscription_price.
Include appropriate constructors, and set and get functions for all the classes.
Demonstrate the classes in a complete program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!