A class Student has rollno, branch; Inter_exam has sub1mark, sub2mark; Ext_exam has sub1mark, sub2mark and Result has Total as data members.

a) A class Student has rollno, branch; Inter_exam has sub1mark, sub2mark; Ext_exam has
sub1mark, sub2mark and Result has Total as data members. Write necessary member
functions to input and print data. Calculate internal exam and external exam subtotals using their respective member functions. Result has a function to calculate Total=internal + external subtotals. Write a complete program to implement the hierarchy of the classes using virtual base class.

Leave a Reply