Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Know how productivity improvements impact quality and value.

Answered: 1 week ago