91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 322KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2024-01-30
  • 語(yǔ)言: C/C++
  • 標(biāo)簽: VC++??

資源簡(jiǎn)介

1、成績(jī)錄入;2、成績(jī)查詢;3、計(jì)算平均分;4、計(jì)算最高分;5、排名;6、退出。

資源截圖

代碼片段和文件信息

#include
#include
#include??
#include??
#include?

//using?namespace?std;

class?Student
{
public:
char?Name[20];//學(xué)生姓名
char?Sex[6];//性別
char?Class[10];//班級(jí)
char?Id[6];//學(xué)號(hào)
float?Score[4];//三科成績(jī)
float?Total;//總分
float?Ave;//平均分
static?int?Total_Stu;//學(xué)生總?cè)藬?shù)
public:
Student();//默認(rèn)構(gòu)造函數(shù)
void?SetStudent(char*?char*?char*?char*?float?float?float?float);//設(shè)置學(xué)生信息
static?void?ShowTotalStu(){?cout?< friend?ostream&?operator<<(ostream&?Student&);//重載<<運(yùn)算符

void?InputStudent();//輸入學(xué)生信息
void?OutputStudent();//輸出學(xué)生信息
void?SearchStudent();//搜索學(xué)生信息
void?DeleteStudent();//刪除學(xué)生信息
void?ChangeStudent();//修改學(xué)生信息
void?SortStudent();//按學(xué)號(hào)進(jìn)行排序
void?SortChinese();//對(duì)語(yǔ)文成績(jī)排序
void?SortMath();//對(duì)數(shù)學(xué)成績(jī)排序
void?SortEnglish();//對(duì)英語(yǔ)成績(jī)排序
void?SortWenzong();
void?SortTotal();//對(duì)總分排序

friend?void?SaveStudent();//保存學(xué)生信息,聲明為友元函數(shù),便于訪問(wèn)保護(hù)數(shù)據(jù)
friend?void?LoadStudent();//下載學(xué)生信息
};
int?Student::Total_Stu?=?0;//靜態(tài)成員初始化

struct?StuNode//鏈表結(jié)構(gòu)
{
Student?stu;
StuNode?*next;
};
StuNode?*headstu?=?NULL;

Student::Student()
{
strcpy(Name?“--“);
strcpy(Sex?“--“);
strcpy(Class?“--“);
strcpy(Id?“000000“);
Score[0]?=?0;?Score[1]?=?0;?Score[2]?=?0;?Score[3]?=?0;
}
void?Student::SetStudent(char?*name?char?*sex?char?*cla?char?*id?float?sco1?float?sco2?float?sco3?float?sco4)
{
strcpy(Name?name);
strcpy(Sex?sex);
strcpy(Class?cla);
strcpy(Id?id);
Score[0]?=?sco1;?Score[1]?=?sco2;?Score[2]?=?sco3;?Score[3]?=?sco4;
Total?=?Score[0]?+?Score[1]?+?Score[2]?+?Score[3];//計(jì)算總分和平均分
Ave?=?Total?/?4;
}
ostream?&?operator<<(ostream?&output?Student?&s)
{
output?< < return?output;
}

void?Student::InputStudent()
{
char?name[20];
char?sex[6];
char?cla[10];
char?id[6];
float?sco[4];
char?choose?=?‘y‘;
while?(choose?!=?‘n‘?&&?choose?!=?‘N‘)
{
cout?< if?(choose?==?‘y‘?||?choose?==?‘Y‘)
{
StuNode?*p?=?new?StuNode;//新建鏈表指針
cin?>>?name?>>?sex?>>?cla?>>?id?>>?sco[0]?>>?sco[1]?>>?sco[2]>>sco[3];
p->stu.SetStudent(name?sex?cla?id?sco[0]?sco[1]?sco[2]sco[3]);
p->next?=?headstu;//前端插入
headstu?=?p;
Total_Stu++;//總數(shù)加1
cout?< }
else
cout?< cin?>>?choose;
}
}
void?Student::OutputStudent()
{
cout?< < for?(StuNode?*p?=?headstu;?p?!=?NULL;?p?=?p->next)//依次輸出
cout?<stu;//使用重載的<<運(yùn)算符
}
void?Student::SearchStud

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????60452??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Debug\Grade.obj

?????文件??????????0??2018-09-25?10:15??成績(jī)管理系統(tǒng)\Debug\student.dat

?????文件??????50176??2018-09-25?10:06??成績(jī)管理系統(tǒng)\Debug\vc60.idb

?????文件??????69632??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Debug\vc60.pdb

?????文件?????266330??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Debug\成績(jī)管理系統(tǒng).exe

?????文件?????328356??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Debug\成績(jī)管理系統(tǒng).ilk

?????文件?????306360??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Debug\成績(jī)管理系統(tǒng).pch

?????文件?????533504??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Debug\成績(jī)管理系統(tǒng).pdb

?????文件??????17665??2018-09-25?10:03??成績(jī)管理系統(tǒng)\Grade.cpp

?????文件??????????0??2018-09-25?10:03??成績(jī)管理系統(tǒng)\student.dat

?????文件????????145??2018-09-25?10:14??成績(jī)管理系統(tǒng)\使用說(shuō)明.txt

?????文件???????4349??2018-09-25?10:06??成績(jī)管理系統(tǒng)\成績(jī)管理系統(tǒng).dsp

?????文件????????532??2018-09-25?10:02??成績(jī)管理系統(tǒng)\成績(jī)管理系統(tǒng).dsw

?????文件??????33792??2018-09-25?10:06??成績(jī)管理系統(tǒng)\成績(jī)管理系統(tǒng).ncb

?????文件??????48640??2018-09-25?10:06??成績(jī)管理系統(tǒng)\成績(jī)管理系統(tǒng).opt

?????文件????????919??2018-09-25?10:03??成績(jī)管理系統(tǒng)\成績(jī)管理系統(tǒng).plg

?????目錄??????????0??2018-09-25?10:15??成績(jī)管理系統(tǒng)\Debug

?????目錄??????????0??2018-09-25?10:11??成績(jī)管理系統(tǒng)

-----------?---------??----------?-----??----

??????????????1720852????????????????????18


評(píng)論

共有 條評(píng)論