⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 credit.cpp

📁 大二时做的课程设计
💻 CPP
字号:
// Credit.cpp: implementation of the CCredit class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Credit.h"
#include <iostream>
#include<sstream>
#include<fstream>
#include<iomanip>
#include "ManageStudent.h"
using namespace std;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CCredit::CCredit():math(7.0),phys(4.0),comp(4.0),math1(4.0),engl(6.0){}
double& CCredit::operator[](int index){
	switch(index)
	{
	case 0:
		return math;
		break;
	case 1:
		return phys;
		break;
	case 2:
		return math1 ;
		break;
	case 3:
		return comp;
		break;
	case 4:
		return engl ;
		break;
	default:
		throw "You must give the index no big than 4 and no less than 0!";
		break;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -