Write a C++ program that does the following: Write a class named Student that has the following variables: name - a string that hold the student's name idNumber - an integer that holds the student's id number major - a string that holds the student's major The class should have the following constructors: A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: student name, ID number, and major. A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: student name and ID number. The major should be assigned an empty string (" "). A constructor that assigns empty strings (" ") to the name and major member variables and 0 to the idNumber member variable.
Write a C++ program that does the following: Write a class named Student that has the following variables:
name - a string that hold the student's name
idNumber - an integer that holds the student's id number
major - a string that holds the student's major
The class should have the following constructors:
A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: student name, ID number, and major.
A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: student name and ID number. The major should be assigned an empty string (" ").
A constructor that assigns empty strings (" ") to the name and major member variables and 0 to the idNumber member variable.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images