Question: All C++ coding please You are asked to implement a class hierarchy for students in a university. There are two categories of students, Bachelor and


You are asked to implement a class hierarchy for students in a university. There are two categories of students, Bachelor and Master. You need to implement a base class Student, and two derived classes, one for the Bachelor students and another for the Master students. Assume that each student in the university has a studenti, a name, a gpo, and a major. Bachelor students are required to do a graduation project and training at some company. Master students are required to do a thesis. Bachelor student rating is different from Master student rating. Question 1120 Marks): Implement the following Student class such that: 1. the default constructor will initialize the student ID to 0, name to "NA", spa to 0, and major to "NA". 2. the parameterized constructor will use the received arguments to initialize the class data members 3. implement the setters appropriately 4. implement getMajor() function to return the major of a student 5. make the member functions GetRating() and IsBachelor() as pure virtual functions 6. implement the printStudent() function to print all the attributes in the Student class. class Student public: Student () Student (int i, float 9, string , string m) : void SetID (int id) ? void 3 tGPA float qp4) void setName(string name): void Set Major (string major): string Get Major(); string getRating (); bool IsBachelor(); virtual void printStudent (: protected: float GetGPA(): private: int studentID: string names string major: float ypa: Question 2 (25 Marks: Define a new class called Bachelorstudent. This class should: 1. Publicly Inherit (derive) class Student 2. include two new string private data members a. project_title b. training company 3. Define a parameterized constructor to initialize all member variables (id, spa, name, major, project_title, training company) 4. Override getRating function such that it returns Excellent for GPA >=84, Very good for [76 to =90, Very good for [84 to
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
