Question: Step 1: Implement the Student Class and write a simple main() driver program to instantiate several objects of this class, populate each object, and display

Step 1:

Implement the Student Class and write a simple main() driver program to instantiate several objects of this class, populate each object, and display the information for each object.

The defintion of the student class should be written in an individual header (i.e. student.h) file and the implementation of the methods of the student class should be written in a corresponding source (i.e. student.cpp) file.

Student class

- The name of the class should be Student.

- The class should be composed of the following (data) members:

student id

first name

last name

middle initial

date of birth in numeric {month, day, year} form

gender, one of {Male, Female}

Note that the data type of each member should be appropriate to the type of data being stored.

and at least the following methods:

Default Constructor

Constructor to initialize the object with at least the name and date of birth of the student.

A method to populate the data members from external (user) input.

Mutator methods for each data member or logical groupings, as necessary. Note that these methods should ensure the integrity of the object and should not allow data to be saved that is not appropriate for that data member. Example, month must be in {1..12}.

Display method to display the contents of the data members.

Step 2:

Implement the following classes:

- Name

- Date

- Program

- Course

- Phone

and update the Student Class as specified.

the class defintion (for each class) should be implemented in an individual header file and the methods of that class in a corresponding source file.

Name class

The name of the class should be Name.

The class should be composed of the following (data) members:

first name

last name

middle initial

Note that the data type of each member should be appropriate to the type of data being stored.

and at least the following methods:

Default Constructor

Constructor to initialize the object with specifed data.

A method to populate the data members from external (user) input.

Mutator methods for each data member or logical grouping, as necessary.

Accessor methods for each data member as needed.

Display method to display the contents of the data members.

Date class

The name of the class should be Date.

The class should be composed of the following (data) members:

month, one of {1 .. 12}

day, one of {1 .. {29,30,31}}

year

Note that the data type of each member should be appropriate to the type of data being stored.

and at least the following methods:

Default Constructor

Constructor to initialize the object with specifed data.

A method to populate the data members from external (user) input.

Mutator methods for each data member or logical grouping, as necessary.

Accessor methods for each data member as needed.

Display method to display the contents of the data members.

Program class

The name of the class should be Program.

The class should be composed of the following (data) members:

campus

Degree, one of {BS, BA}

Major, any major or UNDECLARED

Minor, any minor or NONE

Note that the data type of each member should be appropriate to the type of data being stored.

and at least the following methods:

Default Constructor

Constructor to initialize the object with specifed data.

A method to populate the data members from external (user) input.

Mutator methods for each data member or logical grouping, as necessary.

Accessor methods for each data member as needed.

Display method to display the contents of the data members.

Course class

The name of the class should be Course.

The class should be composed of the following (data) members:

course name

course id

number of credits

instructor

grade received, one of {A,A-,..,F,W}

Note that the data type of each member should be appropriate to the type of data being stored.

and at least the following methods:

Default Constructor

Constructor to initialize the object with specifed data.

A method to populate the data members from external (user) input.

Mutator methods for each data member or logical grouping, as necessary.

Accessor methods for each data member as needed.

Display method to display the contents of the data members.

Phone class

The name of the class should be Phone.

The class should be composed of the following (data) members:

area code

exchange

line

maximum number of texts allowed, a constant data member that represents the maximum possible number of text messages allowed on this phone. Unless specified, the default value should be ten (10).

Note that the data type of each member should be appropriate to the type of data being stored.

and at least the following methods:

Default Constructor

Constructor to initialize the object with specifed data.

A method to populate the data members from external (user) input.

Mutator methods for each data member or logical grouping, as necessary.

Accessor methods for each data member as needed.

Display method to display the contents of the data members.

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!