C++ program to implement multilevel inheritance.
Preparing for C++ Programming exams? Confused about the program solution for implementing multilevel inheritance? Find advice from our experts on this page for your queries.
Following is a question that was asked in the question paper of B.E. Mechanical Engineering (June/July 2017)conducted by Bangalore University, for subject Object Oriented Programming(2K11 Scheme)(ME-601), Semester-VI
This question is asked for 12 marks and hence requires some explanation. Please let me know the solution.
Q) Write a C++ program to implement a class called PERSON having data members as name, date of birth and address. Derive a class STUDENT from PERSON having data members roll number and semester. Derive another class EXAM from STUDENT which has data members mark1, mark2 and average. Compute the average and display the details. [12 Marks]
This question is asked for 12 marks and hence requires some explanation. Please let me know the solution.
Q) Write a C++ program to implement a class called PERSON having data members as name, date of birth and address. Derive a class STUDENT from PERSON having data members roll number and semester. Derive another class EXAM from STUDENT which has data members mark1, mark2 and average. Compute the average and display the details. [12 Marks]