軟體工程課程設計學生成績管理系統
#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;
}我今天沒時間了,先寫這些!
㈡ 軟體工程課程設計報告_學生成績管理系統
我有學生成績管理系統課程設計報告
㈢ 軟體工程:學生成績管理系統 需求分析規格說明書(要求:分別結構化開發方法和面向對象開發方法的相應文檔)
哈哈,這種東西一般都要付費的,我是打醬油的