Question: Please help me write the program below in c++ Define a class called Student. The class will have the following attributesand methods. Attributes(all need to

Please help me write the program below in c++

Define a class called Student.

The class will have the following attributesand methods.

Attributes(all need to be set to private)

id(should be a constant)

first name

last name

major

gpa

Constructors ... 2 overloaded

1) without any parameters

2) second constructor with all 5 attributes as parameters

Behaviors(set all to public)

appropriate getters and setters

findStudent(int id)

listStudents(double gpa)

listStudents(string major)

Files:

Student.h //Definition of the Student class

Student.cpp //Implementation of the Student class

Client.cpp //Contains the main() method, through which the various Student objects will be created and tested.

ToDo:

- Create 5 Student objects; both of the constructors should be used at least once,

Id's: 1001, 1002, 1003, 1004 and 1005

Names and gpa can be at your discetion

Majors can be assigned from: Biology, Computer Science, Education, Engineering, History, Mathematics

- Set up a loop to display the information(values of attributes) of all 5 objects.

- Change the major of two of the Students objects. Display the change.

- Change the gpa of two other Student objects. Display the change.

- Test the findStudent() method by passing a valid id value. Display the appropriate message.

- Test the findStudent() method by passing an invalid(non - existing) id value. Display the appropriate message.

- Test both of the listStudents() methods

+ Pass a double value and list all students whose gpa is above the passed value.

+ Pass a string, and list all students whose major equals the passed value.

+ In either, display the appropriate message ... either found or not found.

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!