📄 studenttype.h
字号:
#ifndef H_studentType
#define H_studentType
#include <fstream>
#include <string>
#include <vector>
#include "personType.h"
#include "courseType.h"
using namespace std;
class studentType: public personType
{
public:
void setInfo(string fname, string lName, int ID,
bool isTPaid,
vector<courseType> courses);
//Function to set the student's information
//The private data members are set according
//to the parameters.
void print(double tuitionRate);
//Function to print the student's grade report
void print(ofstream& out, double tuitionRate);
//Function to print the student's grade report
//The output is stored in a file specified by the
//parameter out.
studentType();
//Default constructor
//Postcondition: Data members are initialized to
//the default values
int getHoursEnrolled();
//Function to return the credit hours a student
//is enrolled in.
//Postcondition: The number of credit hours in which a
// student is enrolled is calculated and returned
double getGpa();
//Function to return the grade point average.
//Postcondition: The GPA is calcualted and returned.
double billingAmount(double tuitionRate);
//Function to return the tuition fees
//Postcondition: The tuition fees due is calcualted
// and returned.
private:
int sId; //variable to store the student ID
int numberOfCourses; //variable to store the number
//of courses
bool isTuitionPaid; //variable to indicate if the tuition
//is paid
vector<courseType> coursesEnrolled; //vector to store the courses
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -