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 lab4.cpp 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. (i.e. Computer Science would be Computer_Science)
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 3 objects of Student type. Note, this should NOT be an array of Student. Use 3 different Student object declarations. We will cover arrays of objects later.
Student
first_name : string
last_name : string
id : int
gpa : double
major: string
+set() : void
 Write a program named lab4.cpp that contains a class named Student

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!