Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve with c++ plzz in one file QUESTION 3: Define a new class called MasterStudent. This class should 1. Inherit (derive) from Student class and

image text in transcribed

image text in transcribed

solve with c++ plzz in one file

QUESTION 3: Define a new class called MasterStudent. This class should 1. Inherit (derive) from Student class and include one new string member variables (thesis). 2. Define a constructor to initialize all member variables (id, gpa, name, major, thesis) 3. Override GetRating function such that it returns Excellent for GPA >=86, Very good for [76 to 70 ) and Fair otherwise 4. Override is Bachelor to return false 5. Override Print to print student id, student name, gpa, and rating. QUESTION 4: write a driver function to test your classes, such that: 1. Define an Array size 10 to track the students of both types. 2. Read the information of 10 students and store them inside the array defined in the previous step. The user will be asked to specify the type of student first (Master, or Bachelor), and then input data according to the type of student. 3. Print all student names whose ranking is Excellent regardless of their type (Master or Bachelor). 4. Print all Bachelor student names whose Major is CS. QUESTION 1: Each student at PSUT has an id, a name, a gpa, and a major. A student can be a bachelor student or a master student. 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. Given the following student class: class Student { public: Student(); // sets all info to o or Student(int i, float g, string n, string m) ; string GetMajor(); void Set ID(int id) ; void SetGPA(float gpa) ; void setName(string name); void SetMajor(string major); virtual string GetRating() = 0; virtual bool IsBachelor() = 0; virtual void Print(); // print all information protected: float GetGPA() { return gpa; } private: int id; float gpa; string name; string major; }; QUESTION 2: Define a new class called Bachelor Student. This class should 1. Inherit (derive) from Student class and include two new string member variables ( project_title, training company). 2. Define a constructor to initialize all member variables (id, gpa, name, major, project_title, training company) 3. Override GetRating function such that it returns Excellent for GPA >=84, Very good for [76 to

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

Develop a program for effectively managing diversity. page 303

Answered: 1 week ago

Question

List the common methods used in selecting human resources. page 239

Answered: 1 week ago