Design and implement three C++ classes to provide a student, under graduate, and graduate classes.These classes will track information for students, both undergraduate and graduate.The classes we will...

1 answer below »
Design and implement three C++ classes to provide a student, under graduate, and graduate classes.These classes will track information for students, both undergraduate and graduate.The classes we will implement are as follows:
•Student Class◦Implement a basic student class, student, will track student information and provide standard support functions for all students. This will include name (first and last), ID, charges/fees, major, and grade point average (GPA). This will be the base class as this will apply to any student(undergraduate or graduate). The other classes will inherit this functionality, so this class must be fully working before working on the subsequent classes.
•Money Class◦A small class, money, the will developed that contains only the student financial data and functions. This isolates the financial information and allows for special protections (encryption) and reporting as is typically required for state and federal reporting. Such functionality will not be part of this project.
•Undergraduate Student Class◦The undergraduate class, underGrad, will provide the same basic capabilities as the student class with some additional functionality. The additional functionality will include tracking the assigned adviser and the student states (e.g., good, special, probation). By using inheritance and deriving this class from the student class, this will ensure we do not have the re-implement the code from the student class.
•Graduate Class◦The graduate class, grad, will provide the same basic capabilities as the underGrad class with some additional functionality. The additional functionality will include tracking the graduate fees and the graduate assistantship status. Again, by using inheritance and deriving this class from the undergraduate class, this will ensure we do not have the re-implement the code for either of the previous classes.
For all implementation code, points will be deducted for poor or especially inefficient solutions.
There are more details in the PDF file. This code is in C++
Answered 1 days AfterSep 09, 2021

Answer To: Design and implement three C++ classes to provide a student, under graduate, and graduate...

Vaibhav answered on Sep 11 2021
144 Votes
grad.h
/*
Name: MY_NAME, NSHE, CLASS-SECTION, ASSIGNMENT
Description:
Input:
Output:
*/
#include "underGrad.h"
/**
* @brief Represents a graduate student. Inherits features of underGrad base
* class, which is also a derived class when inherting from student base class.
*
*/
class grad : public underGrad {
private:
bool isGA;
double gradFees;
// Max
fees of a Graduate Student.
static constexpr double MAX_FEES = 5000.0;
public:
/**
* @brief Construct a new grad object
*
*/
grad(string = "", string = "", string = "", string = "", double = 0.0,
double = 0.0, double = 0.0, string = "", sStat = sStat::NONE,
bool = false, double = 0.0);
/**
* @brief returns status of grad student.
*
* @return true
* @return false
*/
bool getGAStatus() const;
/**
* @brief Get the Grad Fees object
*
* @return double
*/
double getGradFees() const;
/**
* @brief set the grad student status.
*
*/
void setGAstatus(bool);
/**
* @brief Set the Grad Fees object
*
*/
void setGradFees(double);
/**
* @brief Display the details of the Graduate student.
*
*/
void showStudent();
};
money.h
/*
Name: MY_NAME, NSHE, CLASS-SECTION, ASSIGNMENT
Description:
Input:
Output:
*/
/**
* @brief contains only the student financial data and functions.
*
*/
class money {
private:
double charges, financialAid, balance;
// max charges imposed on student.
static constexpr double MAX_CHARGES = 10000.0;
public:
/**
* @brief Construct a new money object
*
*/
money(double = 0.0, double = 0.0);
/**
* @brief Get the Charges object (passed through reference).
*
* @param charges
* @param financialAid
*/
void getCharges(double &charges, double &financialAid) const;
/**
* @brief Get the Balance to be paid by the student.
*
* @return double
*/
double getBalance() const;
/**
* @brief Set the Charges object
*
*/
void setCharges(double charges, double financialAid);
};
student.h
/*
Name: MY_NAME, NSHE, CLASS-SECTION, ASSIGNMENT
Description:
Input:
Output:
*/
#include
#include "money.h"
using namespace std;
/**
* @brief The student base class encompasses basic student data and functions.
*
*/
class student {
public:
/**
* @brief Construct a new student object with default values
*
*/
student(string = "", string = "", string = "", string = "", double = 0.0,
double = 0.0, double = 0.0);
/**
* @brief close the file object.
*
*/
~student();
private:
static constexpr int MAX_MAJORS = 250; // maximum number of majors.
static constexpr double MAX_GPA = 4.0; // max GPA
string firstName;
string lastName;
string studentID;
string major;
double gpa;
ifstream majorsFile;
int majorCodesCount;
string majorCodes[MAX_MAJORS];
money finances; // To implement composition. Represents students finances.
private:
/**
* @brief checks if the ID of the student follows UNLV convention, using
* regular expression.
*
* @return true if the ID is a valid ID. (L followed by 9 digits.)
* @return false if ID is invalid.
*/
bool checkID(string) const;
string expandMajorCode(string);
public:
/**
* @brief Get the First Name object
*
* @return string
*/
string getFirstName() const;
/**
* @brief Get the Last Name object
*
* @return string
*/
string getLastName() const;
/**
* @brief return the ID of the student.
*
* @return string
*/
string getID() const;
/**
* @brief Get the Major object
*
* @return string
*/
string getMajor() const;
/**
* @brief Get the student GPA
*
* @return double
*/
double getGPA() const;
/**
* @brief Set the Name object (both first name and last name)
*
*/
void setName(string, string);
/**
* @brief set the ID of student with internal checks.
*
* @param studentID : value entered...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here