Consider the following Base class UniStudent: class UniStudent { protected: float getGPA() { return st_gpa; } string name; string major; private: int st_id; float st_gpa; public: Unistudent () ;...


I need answer quickly..



Thank you



Consider the following Base class UniStudent:<br>class UniStudent<br>{<br>protected:<br>float getGPA() { return st_gpa; }<br>string name;<br>string major;<br>private:<br>int st_id;<br>float st_gpa;<br>public:<br>Unistudent () ;<br>Unistudent (string n, string m, int id, float gpa);<br>void setStudentID (int id) ;<br>void setGPA(float gpa) ;<br>virtual bool isUnderGrad () = 0;<br>virtual void PrintStudent() { cout <

Extracted text: Consider the following Base class UniStudent: class UniStudent { protected: float getGPA() { return st_gpa; } string name; string major; private: int st_id; float st_gpa; public: Unistudent () ; Unistudent (string n, string m, int id, float gpa); void setStudentID (int id) ; void setGPA(float gpa) ; virtual bool isUnderGrad () = 0; virtual void PrintStudent() { cout < "student="" id:="" "="">< endl;="" }="" };="" write="" the="" class="" mscstudent="" in="" the="" answer="" box="" according="" to="" the="" following="" requirements:="" 1.="" class="" mscstudent="" must="" publicly="" inherit="" class="" unistudent.="" 2.="" class="" mscstudent="" must="" have="" an="" additional="" string="" data="" member="" named="" thesistitle="" 3.="" define="" a="" constructor="" that="" will="" receive="" parameters="" for="" all="" data="" members="" in="" the="" base="" class="" and="" the="" derived="" class,="" your="" constructor="" should:="" o="" invoke="" the="" parametrized="" constructor="" in="" the="" base="" class="" appropriately="" o="" initialize="" the="" derived="" class="" data="" member="" 4.="" override="" the="" function="" isundergrad="" to="" return="" the="" boolean="" value="" false.="" 5.="" override="" the="" function="" printstudent="" to="" print="" all="" base="" class="" and="" derived="" class="" data="" members="" in="" the="" following="" order:="" thesistitle,="" st_id,="" st_gpa,="" name="" and="">
5. Override the function PrintStudent to print all base class and derived class data members in the following order: thesisTitle, st_id, st_gpa,<br>name, and major<br>6. Assume you have defined the function string getStudentRating() in class MScStudent. Furthermore, assume you have the following<br>declaration in the main function:<br>Unistudent * mPtr = new MScStudent (getStudentRating (); (b) what can you add in the blank at the end of the base class to make this function call valid? I Answers to requirements 1 to 5: Answer to Question 6: (a) (b) "/>
Extracted text: 5. Override the function PrintStudent to print all base class and derived class data members in the following order: thesisTitle, st_id, st_gpa, name, and major 6. Assume you have defined the function string getStudentRating() in class MScStudent. Furthermore, assume you have the following declaration in the main function: Unistudent * mPtr = new MScStudent ("Improving DNS Security", "Amal", "CS", 6666, 79.4) ; (a) Briefly describe what is the problem with the following function call cout <« mptr-="">getStudentRating (); (b) what can you add in the blank at the end of the base class to make this function call valid? I Answers to requirements 1 to 5: Answer to Question 6: (a) (b)

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here