Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Home Assignment N0 2: Due Date: Next Week in Lab

The document describes a C++ programming assignment for a publishing company. Students are asked to create a base publication class with title and price attributes. Derive book and tape classes from publication, with book adding a page count and tape adding a playing time. Each class should have setdata and getdata methods. A sales class should also be created to hold an array of 3 monthly sales figures. The main function should provide a menu-based interface. Additional methods and attributes can be included to further develop the classes and sales functionality.

Uploaded by

SaraHussayn
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Home Assignment N0 2: Due Date: Next Week in Lab

The document describes a C++ programming assignment for a publishing company. Students are asked to create a base publication class with title and price attributes. Derive book and tape classes from publication, with book adding a page count and tape adding a playing time. Each class should have setdata and getdata methods. A sales class should also be created to hold an array of 3 monthly sales figures. The main function should provide a menu-based interface. Additional methods and attributes can be included to further develop the classes and sales functionality.

Uploaded by

SaraHussayn
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Home ASSIGNMENT N0 2

Q. Design a C++ program on the following scenario.

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.

Main() function should be Menu based.

Due date: Next Week in Lab

You might also like