Question: Write a program named lab 4 . cpp that contains a class named Student to store student information. Information that will be relevant to store
Write a program named labcpp that contains a class named Student to store student information. Information that will be relevant to store is first name, last name, id number, GPA, and major.
Define a member function named set which allows you to set all member variables. This function has an empty parameter list, and its return type is void. So within the function you'll prompt for information. Note: For entering major, if you need a space, use an underscore. ie Computer Science would be ComputerScience
Define a member function named print that prints a summary of the Student object. You can choose how this data is formatted to the screen you can use the sample run format
Create a driver file to test your class. You should instantiate at least objects of Student type. Note, this should NOT be an array of Student. Use different Student object declarations. We will cover arrays of objects later.
Student
firstname : string
lastname : string
id : int
gpa : double
major: string
set : void
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
