Question: Use virtual base class inheritance to resolve the following dreaded diamond problem. Student Student class having data members: Protected: roll no ,name Sports class
Use virtual base class inheritance to resolve the following dreaded diamond problem. Student Student class having data members: Protected: roll no ,name Sports class having data members: Protected: sp1,sp2,sp3(Sports marks) Academic class having data members: Protected: ml,m2,m3,m4,m5( marks in 5 subjects) Result class have the following member function: Private: total marks; Public: Total(): it will sum up the academic marks and sports marks. display()- it displays the information of the student like his roll,name,total marks
Step by Step Solution
There are 3 Steps involved in it
The detailed ... View full answer
Get step-by-step solutions from verified subject matter experts
