CS304 VU Current Assignment No. 4 Fall 2013 Solution

CS304 VU Current Assignment No. 4 Fall 2013 Solution

Laste Date: 27th Jan 2014

Assignment No. 04
SEMESTER Fall 2013
CS304- Object Oriented Programming
Total Marks: 20
Due Date: 27/01/2014

Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:

The assignment is submitted after due date.
The submitted assignment is other than .cpp file.
The submitted assignment does NOT open or file is corrupted.
The assignment is copied (from other student or ditto copy from handouts or internet).

Uploading instructions

For clarity and simplicity, you are required to Upload/Submit only .CPP file

Objective
The objective of this assignment is:

To give you the idea of practical implementation of concepts inheritance and polymorphism.

Assignment:

Consider the following Class Diagram; detailed description of the diagram is given in the table.

In given class diagram, FeeStructure is a base class; while Local_FS and Overseas_FS are its derived classes sharing its all attributes and functions.
You are required to implement above class diagram in C++. For this you have to use the concept of inheritance and polymorphism. (Hint: In FeeStructure class, make InputFeeDetail(), PrintFeeDetail() and TotalFee() virtual functions.)

For Sample Output, see the next page.

Lectures Covered: This assignment covers Lecture # 22-28
Deadline: Your assignment must be uploaded/submitted at or before. 27th Jan , 2014

SOLUTION IDEA:

ALGORITHM:

Step 1: Start the program.
Step 2: Declare the base class FeeStructure.
Step 3: Declare and define the virtual function InputFeeDetail().
Step 4: Declare and define the function PrintFeeDetail() & TotalFee ()
Step 5: Create the derived class Local_FS & Overseas_FS from the base class.

Related Posts Plugin for WordPress, Blogger...

___________________________________________________________________