Question: In C++. Create a class called student 1. The Student class should have private members: string firstName, string lastName, bool rightHanded. 2..Write getters and setters

In C++.

Create a class called student

1. The Student class should have private members: string firstName, string lastName, bool rightHanded.

2..Write getters and setters for each private data member.

3.Implement a print method to print the values of the Student object to the screen, i.e., write a print function and/or overload the stream output operator.

4.Implement a constructor that sets default values for the member variables.

Next make a student.txt file with 20 random names in it. One student per line and each line has the first name, space, last name, space and the handiness of the student.

Ex: John Exum R

Next in the main function create a vector of students and read the student.txt file and store the information in the vector of students.

Thank you

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!