📄 student.cpp
字号:
#include <iostream>
#include "student.h"
using namespace std;
CStudent::CStudent()
{
strName = "General Student";
chinese = 0 ;
math = 0 ;
english = 0 ;
}
CStudent::CStudent(std::string Name, double c, double m, double e)
{
strName = Name ;
chinese = c ;
math = m ;
english = e ;
}
void CStudent::SetChinese(double a)
{
chinese = a;
}
void CStudent::SetEnglish(double a)
{
english = a;
}
void CStudent::SetMath(double a)
{
math = a;
}
double CStudent::returnChinese()
{
return chinese ;
}
double CStudent::returnEnglish()
{
return english ;
}
double CStudent::returnMath()
{
return math ;
}
double CStudent::returnTotalPreformance()
{
return chinese + math + english ;
}
double CStudent::returnAverage()
{
return (chinese + math + english)/3;
}
string CStudent::returnName()
{
return strName;
}
void CStudent::SetName(std::string c)
{
strName = c;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -