Saturday, 25 January 2014

Object Oriented Programming CS304 Assignment No. 04 Solution Due Date: 27/01/2014

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

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.

For any query about the assignment, contact at CS304@vu.edu.pk
GOOD LUCK

Marks: 20
Consider the following Class Diagram; detailed description of the diagram is given in the
mmm
Class Name
Attribute Name
Attribute Data Type
Behavior (Functions)
FeeStructure
DegreeProgram
Character String
-InputFeeDetail()
-PrintFeeDetail()
-TotalFee ()

       AdmissionFee
Integer
EnrollmentFee
Integer
TuitionFee
Integer
Local_FS
SecurityFee
Integer
-InputFeeDetail()
-PrintFeeDetail()
-TotalFee ()

AdmissionProcessingFee
Integer
Overseas_FS


-InputFeeDetail()
-PrintFeeDetail()
-TotalFee ()




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.
Sample Output:

Untitled