Question
Creating a Class of Your Own In C++, the class is the construct primarily used to create objects. The class data type is defined by
Creating a Class of Your Own
In C++, the class is the construct primarily used to create objects. The class data type is defined by the programmer, consisting of variables and functions or methods. The general format ofa class declaration is as follows:
class ClassName
{
declaration
// ... more declarations
// may follow....
};
Define a class Student that includes the following declarations:
first and last name
student ID
classification
major and if applicable minor
GPA
getStudentName - a function that gets as input the student's first and last name
getClassification - a function that determines the student's classification based upon the number of completed credit hours
getMajor - a function that displays a list of majors and allows the student to select his/her major from the list
calcStudentID - a function that assigns a student ID numbers using some system of numbers and letters (e.g., 900-xxx-xxx)
determineAcademicStanding - function that checks to see if student is in good academic standing (GPA >= 2.75)
Once you define the class Student, be sure to define each corresponding function or method as well. For example, you need to define a function (void getStudentName();) that asks the student to enter his/her first and last name. Each function must be defined correctly, including correct use of parameters as needed.
Define a main function to do the following:
Create an instance of the object Student.
Call the appropriate function to get the student's name and display the student's name on the screen.
Call the appropriate function to get the student's classification and display it on the screen.
Call the appropriate function that allows the student to select his/her major from the list
Call the appropriate function to assign a student ID numbers using some system of numbers and letters
Display student's ID number on the screen
Call the appropriate function to see if student is in good academic standing (GPA >= 2.75) and prints the appropriate message given the circumstance (e.g, "Your GPA is 2.5, so please make an appointment to see your advisor concerning your academic progress.")
Display a record of the student's information, including the student's name, student ID, classification, major, GPA and academic standing on the screen. Make sure the information is displayed in a uniform manner (e.g. use of tabs or in a table format)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started