studentlist.h

来自「学生成绩查询系统.帮忙大家学生和提升对VC++的学生和认识.」· C头文件 代码 · 共 32 行

H
32
字号
#ifndef __STUDENTLIST_H__
#define __STUDENTLIST_H__

#include "clsStudent.h"

struct XY {
	int x, y;
};

class StudentList {
private:
	Student2* m_pStudent;
	int m_nStudent;
public:
	StudentList(Student2* pStudent, int nStudent);
	StudentList();
	StudentList(const StudentList& studlist);
	StudentList& operator=(const StudentList& studlist);
	~StudentList();
	void SetStudentList(Student2* pStudent, int nStudent);
	Student2* GetpStudent() const;							// 取数组指针
	int GetnStudent();										// 取学生人数
	float Average(int period);								// 求平均分数
	float StdDev(int period);								// 求标准偏差
	XY* Distribution(int period);							// 计算分数分布
	Student2 FindMax(int period);							// 找到最高分得主
	void BubSort(int period);								// 按分数高→低排序
private:
	void swap(Student2& a, Student2& b);
};

#endif

⌨️ 快捷键说明

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