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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started