Home Assignment N0 2: Due Date: Next Week in Lab
Home Assignment N0 2: Due Date: Next Week in Lab
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
float) of a 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 float). Each of
these three classes should have a setdata and getdata() function.
Other than this you have to design functions related with book and audiocassette.
You can also add extra data members for this purpose.
Using containership concept add new class sales that hold an array of three floats so
that it can record the dollar sales of a particular publication for the last three
months. Other than setdata and getdata you have to design your own functions
related to sales which will different store sales data. For designing new functions you
can also add new data members.