Assignment No. 02 SEMESTER Fall 2018CS304 - Object Oriented Programming
Problem
Statement
Write
a program containing three classes Person,
Student, and Exam for an Examination database using Inheritance. Class Person is the base class, Student is the intermediate base class,
and Exam is the derived class. The
Student class should inherit the properties of Person class whereas, the Exam
class should inherit the properties of Student class (directly) and properties
of Person class (indirectly). Implement the model shown in figure using the
following hints.
Data Members
Person Class:
Name, Gender Age
Student Class:
RollNo, Subject
Exam Class:
Sub1Marks, Sub2Marks
Member Functions
You
are required to write the following member functions for all three classes:
·
readData()
·
displayData()
Class
Person
Class Student
Class Degree Student
Figure 1: Model
of Examination Database using Inheritance