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,
numberofpages, 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 yearlysubscriptionprice.
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
