Question: Write a C + + program that creates a class Student which has the following private attributes: ID ( int ) , name ( string
Write a C program that creates a class Student which has the following private attributes: ID int name string GPA float and phoneNumber string The class should contain the following public functions:
setID int id to set the ID value
setName string name to set the name value
setGPA float gpa to set the GPA value
setphoneNumber string number to set the phoneNumber value
int getID to get the ID value
string getName to get the name value
float getGPA to get the GPA value
string getphoneNumber to get the phoneNumber value
void displayStudentInfo to display the student info as: "The student ID is name is Mark, GPA is and phone number is using the getter functions eg getID
Then, create student objects, ask user for information and display their information on the screen. Here are the steps: write a loop that iterate time and, in each iteration,
Create an object of the Student class
Ask user for information eg ID and use the setter functions eg setID to set the values of the student objects
Displays the student information stored using the displayStudentInfo function, each one per line.
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
