- Back to Home »
- vu »
- CS304 Object Oriented Programming Assignment No 2 Discussion Spring 2014 Written Updates
Posted by : Unknown
Monday, 19 May 2014
CS304 Object Oriented Programming Assignment No 2 Discussion Spring 2014 Written Updates
CS304 Object Oriented Programming Assignment No 2 Solution Sponsored Links
In continuation of the assignment no. 1, consider the following class diagram (a part from Assignment no. 1 solution), detailed description of the diagram is given in the table.
Table:
Class Name
Attribute Name
Attribute Data Type
Behavior (Functions)
Company
Comp_Name
Character Pointer
-Default Constructor
- Profit_Report()
- Financial_Statement()
Registration_No
Character Pointer
Transport
Weight
Integer
- Default Constructor
- Carray_Goods()
Capacity
Integer
Speed
Integer
Land_Transport
Transportation_Mode
Character Pointer
- Default Constructor
Vehicle_Type
Character Pointer
Air_Transport
Aircraft_Type
Character Pointer
- Default Constructor
Airraft_Name
Character Pointer
Length
Integer
Room
Width
Integer
Default Constructor
Store()
Hall
Length
Integer
Default Constructor
Store()
Width
Integer
You are required to map (implement/Code) this class diagram into C++.
Make sure that your solution must contain ONLY classes’ definitions given in the diagram, definitions of all attributes and proper declaration and definitions of member functions including constructors that are given in the above table.
Detail of some Member Functions:
Profit_ Report( ): This function prints the annual profit of the company.
Financial_Statement( ): This function prints the annual financial statement of the company.
Carry_Good( ): Each transport has carrying goods functionality.
Note:
The body of all member functions should be empty, while the constructors should have code which initializes the objects.
In main function you may print a simple “cout” statement in order to check your program for syntax errors.
You must also implement inheritance and aggregation.
Lectures Covered: This assignment covers Lecture # 07-10
Deadline: Your assignment must be uploaded/submitted at or before. May 20, 2014