6.2. Write a program having a base class Student with data member rollno and member functions getnum( to input rollno and putnum() to display rollno. A class Test is derived from class Student with...


in C++



6.2. Write a program having a base class Student with data member rollno and member<br>functions getnum( to input rollno and putnum() to display rollno. A class Test is<br>derived from class Student with data member marks and member functions<br>getmarks() to input marks and putmarks() to display marks. Class Sports is also<br>derived from class Student with data member score and member functions getscore()<br>to input score and putscore() to display score. The class Result is inherited from two<br>base classes, class Test and class Sports with data member total and a member<br>function display() to display rollno, marks, score and the total(marks + score).<br>

Extracted text: 6.2. Write a program having a base class Student with data member rollno and member functions getnum( to input rollno and putnum() to display rollno. A class Test is derived from class Student with data member marks and member functions getmarks() to input marks and putmarks() to display marks. Class Sports is also derived from class Student with data member score and member functions getscore() to input score and putscore() to display score. The class Result is inherited from two base classes, class Test and class Sports with data member total and a member function display() to display rollno, marks, score and the total(marks + score).

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here