Define two class types: Student and Graduate, where Graduate inherits from St udent. Class Student includes (1) member variables: name, id, and score (protected) (2) member functions: (public) a...


Please solve the Programming problem. Two images attached accordingly.


Define two class types: Student and Graduate, where Graduate inherits from St<br>udent.<br>Class Student includes<br>(1) member variables: name, id, and score (protected)<br>(2) member functions: (public)<br>a default constructor Student::Student(): name(

Extracted text: Define two class types: Student and Graduate, where Graduate inherits from St udent. Class Student includes (1) member variables: name, id, and score (protected) (2) member functions: (public) a default constructor Student::Student(): name("no name"), id(0), score (0) constructor Student:Student(string n, int i, double s): name(n), id(i), scor e(s). void output() Class Graduate has (1) additional member variables: string supervisor; (private) (2) additional member functions: (public) a default constructor Graduate:Graduate(): Student(),supervisor("no na me") constructor Graduate:: Graduate (string n, int i, double s, string sn): Stude nt(n,l,s), supervior(sn). void output() ---redefine the function Define three graduate student g1, g2,g3 in main function (1) Input the information for g1 from the keyboard; (2) Initialize the information for g2 when it is declared (using default construct or); (3) Initialize the information for g3 when it is declared (using normal construct
(3) Initialize the information for g3 when it is declared (using normal construct<br>or);<br>int main()<br>{ string name;<br>int id;<br>double score;<br>string supervior;<br>Graduate g1,g2,g3(

Extracted text: (3) Initialize the information for g3 when it is declared (using normal construct or); int main() { string name; int id; double score; string supervior; Graduate g1,g2,g3("Tom", 1,90,"Peter"); cin<><><>

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here