Book class 2

Imagine a publishing company that markets both books and audio- cassette version of its works. Create a class Publication in C++ 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 and Tape, which adds playing time in minutes. These... Continue Reading →

Distance Measure

Define two classes Distance1 and Distance2 in C++. Distance1 stores distance in miles and Distance2 in kmeters & meters. Reads values of the class objects and adds one object of Distance1 with the object of Distance2 class. The display should be in the format of miles or kmeters & meters depending on the type of... Continue Reading →

Volume of box 1

Design a class named Box whose dimensions are integers and private to the class. The dimensions are labelled: length l, breadth b, and height h. The default constructor of the class should initialize l, b, h and to 0. The parameterized constructor Box(int length, int breadth, int height) should initialize Box's l, b and h... Continue Reading →

ComputerUserAccess 1

Users of the computer have profile which consists of Name, Password, and Access Rights. Access rights take on values X, R, W, and A. It is possible to have default values for Password and Access rights which are the first three letters of the Name and ALL respectively. Users can change their password and access... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started