CS211 Homework 2 solution

$30.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

The aim of this homework assignment is to practice writing classes. This homework assignment will help build towards project 1, which will be to write a program implementing Management of Rosters System.

For this assignment, write a class called Student. This class should contain information of a single student. This information includes:

last name,
first name,
standing,
credits,
gpa,
date of birth,
matriculation date.

For now you can store date of birth and date of matriculation as strings. Your class should support the following functions:

  1. Constructor that initializes a Student by accepting all the parameters.
    2. Default constructor that initializes everything to default values.
    3. Accessor functions for each private instance variable.
    4. Mutator functions for each private instance variable.
    5. Input function to solicit the information.
    6. Output function to print out the information about the student to console.
    7. Any other necessary functions you feel are appropriate.

Make sure that the standing is set based on credits and not passed in as a parameter. When you call mutator function on credits, or initialize an object in a constructor, or through input function, that is where the standing is set.

 

Standing is:

Lower Freshman         0 <= credits < 15

Upper Freshman         15 <= credits < 30
Lower Sophomore      30 <= credits < 45

Upper Sophomore       45 <= credits < 60

Lower Junior              60 <= credits < 75

Upper Junior               75 <= credits < 90

Lower Senior              90 <= credits < 105

Upper Senor                105 <= credits

 

 

Write a driver program to test you class.

Submit the assignment to your lab instructor.