当前位置:
文档之家› C++实现:简单的学生信息管理系统
C++实现:简单的学生信息管理系统
cout << "当前系统中没有学生信息,请先添加学生信息!" << endl;
cout << "---------------------------------------" << endl;
}
else
{
SearchStudent();
cout << "您想删除该学生的信息吗?" << endl;
cin >> flagOperateInformation;
();
cout << endl;
if (flagOperateInformation)
EditMenu();
}
}
<< endl;
cout << "按下2:修改学生信息." << endl;
cout << "按下3:删除学生信息." << endl;
{
case 1:AddStudentPersonalInformation(1); break;
case 2:ModifyStudentInformation(); break;
case 3:DeleteStudentInformation(); break;
case 4:DisplayStudentInformation(); break;
}
else
{
cout << "未找到该学生" << endl;
}
}
void ModifyStudentInformation()
{
using namespace std;
using namespace studentInformation;
int searchVectorSize = ();
if (searchVectorSize == 0)
}
void SearchStudent()
{
using namespace std;
using namespace studentInformation;
char ID[13];
cout << "请输入学生的学号:"<<endl;
cin >> ID;
();
cout << "------------------------------"<<endl;
{
std::vector<Student>::iterator iter = () + flagStudentChoose; tudent_DisplayInformation();
}
}
bool CmpGrade(Student student1, Student student2)
{
return () > ();样能实现成绩的降序排列
cout << "学习成绩输入成功!" << endl
<< "------------------------------" << endl;
}
tudent_WriteOtherGrade(peerGrade, teacherGrade, ethicGrade);
cout << "其他成绩输入成功!" << endl
case 5:RankByID(); break;
case 6:cout << "功能暂未实现" << endl; break;
case 7:cout << "功能暂未实现" << endl; break;
case 8:DisplayAllStudentInformation(); break;
case 0:break;
}
}
}
tudent_WritePersonalInformation(iD,name,address,phone);
cout << "基本信息输入成功!" << endl
<< "------------------------------" << endl;
}
tudent_WriteMaPhEgGrade(mathGrade, physicsGrade, englishGrade);
}
else
{
cout << "--------------------------------------------------------" << endl;
cout << "姓名学号综合成绩综合排名" << endl;
for (i = 0; i < displayVectorSize; i++)
int flagModify;
cin >> flagModify;
();
if ((flagModify == 1)&(flagStudentFound == 0))
{
AddStudentPersonalInformation(2);
}
}
}
void DeleteStudentInformation()
return true;
else
return false;
}
void RankByID()
{
using namespace studentInformation;
using namespace std;
int rankVectorSize = ();
sort(), (), CmpID);
cout << "-----------------------------------" << endl;
}
void RankByGrade()
{
using namespace studentInformation;
using namespace std;
int rankVectorSize = ();
if (rankVectorSize == 1)
{
studentVector[0].Student_WriteGradeRank(1);
{
using namespace studentInformation;
using namespace std;
int rankVectorSize = ();
if (rankVectorSize == 1)
{
studentVector[0].Student_WriteTotalGradeRank(1);
cout << "按下0:返回上一级." << endl;
cout << "--------------------------------------------" << endl << endl;
cin >> flagContinueOperation;
();
cout << endl;
switch (flagContinueOperation)
cout << "ห้องสมุดไป่ตู้下4:显示学生信息." << endl;
cout << "按下5:按学号升序排序" << endl;
cout << "按下6:读入已有信息(暂时没实现)" << endl;
cout << "按下7:将信息输出(暂时没实现)" << endl;
cout << "按下8:显示系统内所有学生的信息" << endl;
}
else
{
sort(), (), CmpGrade); tudent_ReadGrade() == studentVector[i - 1].Student_ReadGrade()))
studentVector[i].Student_WriteGradeRank(studentVector[i - 1].Student_ReadGradeRank());
<< endl << endl;
cout << "按下1:进入学生信息管理系统." << endl;
cout << "按下0:退出." << endl;
cout << "-----------------------------------------------------" << endl<<endl<<endl;
int vectorSize = ();
int i = 0;
while ((i<vectorSize) & (flagStudentFound!=0))
{
flagStudentFound = strcmp(ID, studentVector[i].Student_ReadID());