Question: solve with c++ [30%] QUESTION 3: Writing a Driver Program. Write a driver program to test your class. Proceed as follows: a) Define book1: 1.

 solve with c++ [30%] QUESTION 3: Writing a Driver Program. Write

a driver program to test your class. Proceed as follows: a) Define

solve with c++

[30%] QUESTION 3: Writing a Driver Program. Write a driver program to test your class. Proceed as follows: a) Define book1: 1. Prompt the user to enter the ID and title along with the rating and published year of the book. 2. Define an object of type Book (named book1). 3. Use the setters to set the attributes of book1 to the values provided by the user. 4. Print the details of the book. b) Define book2: 1. Define an object of type Book (named book2). 2. Prompt the user to enter the ID and title along with the rating and published_year of the book. 3. Use the setters to set the attributes of book2 to the values provided by the user. 4. Print the details of the book. 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 or Student(int i, float g, string n, string m); string GetMajor(); void SetID(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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!