软件工程课程设计学生成绩管理系统
#include <iostream>
using namespace std;
class stuhandle
{
private:
char name[10];
int stunumber[10];
protected:
char subject[9];
int score[9];
public:
void addstu()
{
/*我不知道你的信息具体是什么这里就只添加姓名、学号、科目和分数。*/
int i,n;
for(i=1;i<10;i++)
{
cout<<"Please input the "<<i<<" students' name:"<<endl;
cin>>name[i];
cout<<"Please input the "<<i<<" students' number:"<<endl;
cin>>stunumber[i];
for(n=1;n<9;n++)
{
cout<<"Please input the "<<i<<" students' subject:"<<endl;
cin>>subject[n];
cout<<"Please input the "<<i<<" students' score:"<<endl;
cin>>score[n];
}
}
}
void deletestu()
{
cout<<"Please input the student's name you wanna delete:"<<endl;
char na;
cin>>na;
int i,n;
for(i=1;i<10;i++)
{
if(name[i]==na)
{
name[i]=NULL;
stunumber[i]=NULL;
}
for(n=1;n<9;n++)
{
subject[n]=NULL;
score[n]=NULL;
}
break;
}
}
void change()
{
cout<<"Please input the student's name you wanna change:"<<endl;
char ch;
cin>>ch;
cout<<"Which information you wanna change?"<<endl;
cout<<"(1)学号: (2)分数: "<<endl;
int i,n;
cin>>i;
switch(i)
{
case 1:
cout<<"Please input the new student number:"<<endl;
int sn;
cin>>sn;
for(n=1;n<10;n++)
{
if(ch==name[n])
{
stunumber[n]=sn;
}
break;
}
break;
case 2:
cout<<"Please input the subject you wanna change:"<<endl;
char sub,scoren;
cin>>sub;
cin>>scoren;
for(n=1;n<9;n++)
{
if(sub==subject[n])
{
score[n]=scoren;
}
break;
}
break;
default:
cout<<"No such function!"<<endl;
}
}
void search(char na)
{ cin>>na;
int n;
for(n=1;n<10;n++)
{
if(na==name[n])
{
cout<<"The Student number is :"<<stunumber[n]<<endl;
cout<<"The Student number is :"<<subject[n]<<endl;
cout<<"The Student number is :"<<score[n]<<endl;
}
break;
}
}
void search(int num)
{
cin>>num;
int n;
for(n=1;n<10;n++)
{
if(num==name[n])
{
cout<<"The Student number is :"<<name[n]<<endl;
cout<<"The Student number is :"<<subject[n]<<endl;
cout<<"The Student number is :"<<score[n]<<endl;
}
break;
}
}
void statistics(char subject,float lowscore,float highscore)
{
}
void sort(char name,char subjcet)
{
}
};
int main()
{
int i;
stuhandle student;
while(true)
{
cout<<"(1)信息维护: (2)信息查询: (3)成绩统计: (4)排序:"<<endl;
cin>>i;
switch(i)
{
case 1:
cout<<"(1)添加:(2)删除:(3)修改:"<<endl;
cin>>i;
switch(i)
{
case 1:
student.addstu();
break;
case 2:
student.deletestu();
break;
case 3:
student.change();
break;
default:
cout<<"There are no such function!"<<endl;
}
break;
case 2:
cout<<"Please input the name or the number:"<<endl;
cout<<"(1)Name: (2)Number:"<<endl;
char name;
int num;
int i;
cin>>i;
switch(i)
{
case 1:
cout<<"Name:"<<endl;
cin>>name;
student.search(name);
break;
case 2:
cout<<"Number:"<<endl;
cin>>num;
student.search(num);
break;
default:
cout<<"No such function!"<<endl;
}
break;
case 3:
break;
case 4:
break;
default:
cout<<"There are no such function!"<<endl;
}
cin.get();
cin.get();
system("cls");
}
return 0;
}我今天没时间了,先写这些!
㈡ 软件工程课程设计报告_学生成绩管理系统
我有学生成绩管理系统课程设计报告
㈢ 软件工程:学生成绩管理系统 需求分析规格说明书(要求:分别结构化开发方法和面向对象开发方法的相应文档)
哈哈,这种东西一般都要付费的,我是打酱油的