當前位置:首頁 » 考試成績 » 學生成績管理系統的閱讀對象

學生成績管理系統的閱讀對象

發布時間: 2020-12-20 05:14:14

學生成績管理系統用類 請用面向對象方法設計並實現如下功能: l 設置學生的成績信息:學生學號、姓名、所

Based on your subject 學生成績管理系來統用類 請用面自向對象方法設計並實現如下功...,
聯系我們需要提供你的問題和電子郵件,
還有別的要求么,可以與我們聯系,
有時間可以幫你,
網路_Hi聯系我,
此回復針對所有來訪者和需求者有效,
ES:\\

❷ 學生成績統計管理系統C++使用類和對象 滿意補充100分

#include"stdafx.h"
#include<malloc.h>
#include<iostream>
#include<iomanip>
#include<string>
usingnamespacestd;
#defineN5
classStudent
{
public:
stringname;
floatmath;
floatchinese;
floatenglish;
floatsum;
intrange;

staticfloataveproject[3];
staticintnopass[3];
staticintpretty[3];
Student(){name="";math=0;chinese=0;english=0;sum=0;}
Student(stringn,floatm,floatc,floate):name(n),math(m),chinese(c),english(e)
{
=math+chinese+english;

}
voidsetmessage(stringn,floatm,floatc,floate)
{
name=n;
math=m;
chinese=c;
english=e;
sum=math+chinese+english;
}

};
floatStudent::aveproject[3]={0};
intStudent::nopass[3]={0};
intStudent::pretty[3]={0};
voidtotal(Student*s,intn){
inti;
for(i=0;i<n;i++)
{
s[0].aveproject[0]=s[0].aveproject[0]+s[i].math;
s[0].aveproject[1]=s[0].aveproject[1]+s[i].chinese;
s[0].aveproject[2]=s[0].aveproject[2]+s[i].english;
}
s[0].aveproject[0]/=n;
s[0].aveproject[1]/=n;
s[0].aveproject[2]/=n;
for(i=0;i<n;i++)
{
if(s[i].math<s[0].aveproject[0])s[0].nopass[0]++;elses[0].pretty[0]++;
if(s[i].chinese<s[0].aveproject[1])s[0].nopass[1]++;elses[0].pretty[1]++;
if(s[i].english<s[0].aveproject[2])s[0].nopass[2]++;elses[0].pretty[2]++;
}
}
voidprintrank(Student*s,intn)
{
inti;
for(i=0;i<n;i++)
{
cout<<s[i].name<<setw(5)<<s[i].math<<setw(5)<<s[i].chinese<<setw(5)
<<s[i].english<<setw(5)<<s[i].sum<<endl;
}
}
voidprintave(Student*s)
{
cout<<"數學平均分:"<<Student::aveproject[0]<<endl;
cout<<"語文平均分:"<<Student::aveproject[1]<<endl;
cout<<"英語平均分:"<<Student::aveproject[2]<<endl;
}
voidprintnopass(Student*s)
{
cout<<"數學不及格人數:"<<Student::nopass[0]<<endl;
cout<<"語文不及格人數:"<<Student::nopass[1]<<endl;
cout<<"英語不及格人數:"<<Student::nopass[2]<<endl;
}
voidprintpretty(Student*s)
{
cout<<"數學優秀人數:"<<Student::pretty[0]<<endl;
cout<<"語文優秀人數:"<<Student::pretty[1]<<endl;
cout<<"英語優秀人數:"<<Student::pretty[2]<<endl;
}
intmain()
{
inti,j;
Studentstu[N]={Student("LiLei",100.0,90,87),Student("HanMe",68,90.0,97),Student("Lucy",100.0,87,67)};
stu[4].setmessage("lida",92,96,70);
stu[3].setmessage("lsao",78,76,90);
total(stu,N);
printrank(stu,N);
printave(stu);
printnopass(stu);
printpretty(stu);
return0;
}

❸ 學生成績管理系統 要求:1,學生基本信息,(學號,姓名,班級) 2,學生選課信息(平時成績,期末成績)

用struct定義一個結構體數組,比如
struct student
{ char name[30];
int math;
int chinese;
.....
int total;
int averrage;
int score;
};
struct student stu[N]; 這里有幾個學生N就等於幾
然後內定義幾個count值去記錄滿足某容個條件的學生個數就行了。
比如算有幾個math不及格的學生
int count=0,i;
for(i=0;i<N;i++)
if(stu[i].math<60)
count++;
其他方面就按照類似方法記錄

❹ 學生成績管理系統

wo gang xie le ge yao jia Q

❺ 請用C++面向對象的方法實現一個簡單的學生成績管理系統。

class Stu
{
private:
string name; //string是字元串類,在這里定義了學生姓名的字元串
char num[11]; //定義char,是為調用字元數值轉換函數atol准備
float sc_computer;
char major;
public:
Stu();
Stu(stringa,char b[],char c):name(a),sc_computer(c)//構造函數初始化
{ int i=0;
while(b[i]!='\0') { num[i]=b[i]; i++;}
num[i]='\0';}
int Sort_Sc(Stu sc[],intcount); //按照計算機成績對學生信息排序
int Sub_Major(Stu nm[],int count); //按學好分專業
intShow_Stu(Stu sc[],int count); //顯示學生信息
intInit_Stu(Stu sc[],int count); //學生錄入

};
/**********************************主程序**********************************/
int main()
{
int cnt=0;
Stu *stu,st;
char choice;
charch1;
cout<<"\t\t****\n\n\t\t\t歡迎進入學生信息管理查詢系統\n\n\t\t****\n\n";
cout<<"\t\t\t***************主菜單***************\n\n";
cout<<"\t\t\t\t1>學生信息錄入\n\n";
cout<<"\t\t\t\t2>學生信息顯示\n\n";
cout<<"\t\t\t\t3>學生信息排序\n\n";
cout<<"\t\t\t\t4>學生專業\n"<<endl;
cout<<"\t\t\t\t0>退出\n";
ch1='y';
do{
cout<<"\n請選擇功能選項: ";
cin>>choice;
switch(choice)
{
case'0': {ch1='n';break;}
case'1':{
cout<<"請輸入學生的數量: ";
cin>>cnt;
stu=newStu[cnt+1]; //Stu[0]不存學生信息,學生信息從數組下標1開始
st.Init_Stu(stu,cnt);
break;}
case'2':{
cout<<"輸出所有學生信息:"<<endl;
st.Show_Stu(stu,cnt);
break;}
case'3':{
st.Sort_Sc(stu,cnt);
st.Show_Stu(stu,cnt);
break;}
case'4':{
st.Sub_Major(stu,cnt);
st.Show_Stu(stu,cnt);
break;}
default:{
cout<<"\a\a警告:您輸入錯誤,是否重輸!(y/n)\t";
cin>>ch1;} }
}while(ch1=='y');

❻ 急求 學生成績管理系統 請用面向對象方法設計並實現如下功能(c++)

// 學生成績管理系統.cpp : 定義控制台應用程序的入口點。
//

#include "stdafx.h"
#define N 2
struct StudentType
{
char no[10];
char name[10];
double foreigen;
double spec1;
double spec2;
double total;
};
void InputMarks(struct StudentType student[],int n);
void AddMarks(struct StudentType student[],int n);
void OutputMarks(struct StudentType student[],int n);

int _tmain(int argc, _TCHAR* argv[])
{
struct StudentType stu[N];
InputMarks(stu,N);
AddMarks (stu,N);printf("各個考生的總成績為:\n");
OutputMarks(stu,N);
return 0;
}

void InputMarks(struct StudentType student[],int n)
{
for (int i = 0; i<n; i++)
{
("請輸入第%d個考生考號:",i+1);
scanf("%s",student[i].no);
printf("請輸入第%d個考生姓名:",i+1);
scanf("%s",student[i].name);
printf("請輸入第%d個考生的外語成績:",i+1);
scanf("%lf",student[i].foreigen);
printf("請輸入第%d個考生專業課程1:",i+1);
scanf("%lf",student[i].spec1);
printf("請輸入第%d個考生專業課程2:",i+1);
scanf("%lf",student[i].spec2);
}
return;
}
void AddMarks(struct StudentType student[] , int n)
{
for (int i= 0; i<n ; i++)
{
student[i].total=student[i].foreigen+student[i].spec1+student[i].spec2;
}
return;
}
void OutputMarks(struct StudentType student[],int n)
{
for (int i=0;i<n;i++)
{
printf("%s的總分是5.lf\n",student[i].name,student[i].total);
}
return;
}
我用VS編的,你適當改改就可以用了

❼ 學生成績管理系統 (模擬實現一個學生成績管理系統:該系統存儲學生學號、姓名、性別、專業班級、C語言課程

能翻譯一下嗎

❽ 面向對象程序設計編寫一個簡單的學生成績管理系統

#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#define LEN sizeof(struct scorenode)
#define DEBUG
#include <string.h>
struct scorenode
{int number;/*學號*/
char name[10];/*姓名*/
float computer;/*計算機 成績*/
float english;/*英語成績*/
float math;/*數學成績 */
struct scorenode *next;
};
typedef struct scorenode score;
int n,k;/*n,k為全局變數,本程序中的函數均可以使用它*/
/*==============================================================================================*/
score *creat(void)/*函數creat,功能:創建鏈表,此函數帶回一個指向鏈表頭的指針*/
{
score*head;
score *p1,*p2,*p3,*max;
int i,j;
float fen;
char t[10];
n=0;
p1=p2=p3=(score *)malloc(LEN);head=p3; /*開辟一個新單元輸入學生相關資料*/
printf("請輸入學生資料,輸0退出!\n");
repeat1: printf("請輸入學生學號(學號應大於0):");
scanf("%d",&p1->number);
while(p1->number<0)
{getchar();
printf("輸入錯誤,請重新輸入學生學號:");
scanf("%d",&p1->number);}
if(p1->number==0)
goto end;
else
{
p3=head;
if(n>0)
{for(i=0;i<n;i++)
{if(p1->number!=p3->number)
p3=p3->next;
else
{printf("學號重復,請重輸!\n");
goto repeat1;
}
}
}
}
printf("請輸入學生姓名:");
scanf("%s",&p1->name);
printf("請輸入計算機 成績(0~100):");
scanf("%f",&p1->computer);
while(p1->computer<0||p1->computer>100)
{getchar();
printf("輸入錯誤,請重新輸入計算機 成績");
scanf("%f",&p1->computer);}
printf("請輸入英語成績(0~100):");
scanf("%f",&p1->english);
while(p1->english<0||p1->english>100)
{getchar();
printf("輸入錯誤,請重新輸入英語成績");
scanf("%f",&p1->english);}
printf("請輸入數學成績(0~100):");
scanf("%f",&p1->math);
while(p1->math<0||p1->math>100)
{getchar();
printf("輸入錯誤,請重新輸入數學成績");
scanf("%f",&p1->math);}
head=NULL;
while(p1->number!=0)
{
n=n+1;
if(n==1)
head=p1;
else
p2->next=p1;
p2=p1;
p1=(score *)malloc(LEN);
printf("請輸入學生資料,輸0退出!\n");
repeat2:printf("請輸入學生學號(學號應大於0):");
scanf("%d",&p1->number);
while(p1->number<0)
{getchar();
printf("輸入錯誤,請重新輸入學生學號:");
scanf("%d",&p1->number);}
if(p1->number==0)
goto end;
else
{
p3=head;
if(n>0)
{for(i=0;i<n;i++)
{if(p1->number!=p3->number)
p3=p3->next;
else
{printf("學號重復,請重輸!\n");
goto repeat2;
}
}
}
}
printf("請輸入學生姓名:");
scanf("%s",&p1->name);
printf("請輸入計算機 成績(0~100):");
scanf("%f",&p1->computer);
while(p1->computer<0||p1->computer>100)
{getchar();
printf("輸入錯誤,請重新輸入計算機 成績");
scanf("%f",&p1->computer);}
printf("請輸入英語成績(0~100):");
scanf("%f",&p1->english);
while(p1->english<0||p1->english>100)
{getchar();
printf("輸入錯誤,請重新輸入英語成績");
scanf("%f",&p1->english);}
printf("請輸入數學成績(0~100):");
scanf("%f",&p1->math);
while(p1->math<0||p1->math>100)
{getchar();
printf("輸入錯誤,請重新輸入數學成績");
scanf("%f",&p1->math);}
}
end: p1=head;
p3=p1;
for(i=1;i<n;i++)
{
for(j=i+1;j<=n;j++)
{
max=p1;
p1=p1->next;
if(max->number>p1->number)
{
k=max->number;
max->number=p1->number;
p1->number=k;
strcpy(t,max->name);
strcpy(max->name,p1->name);
strcpy(p1->name,t);
fen=max->computer;
max->computer=p1->computer;
p1->computer=fen;
fen=max->english;
max->english=p1->english;
p1->english=fen;
fen=max->math;
max->math=p1->math;
p1->math=fen;
}
}
max=head;p1=head;/*重新使max,p指向鏈表頭*/
}
p2->next=NULL;/*鏈表結尾*/
printf("輸入的學生數為:%d個!\n",n);
return(head);
}
/*==============================================================================================*/
score *add2311(score *head,score *stu)/*函數add2311,功能將所有學生資料按學號排序*/
{
score *p0,*p1,*p2,*p3,*max;
int i,j;
float fen;
char t[10];
p3=stu=(score *)malloc(LEN);/*開辟一個新單元*/
printf("\n輸入要增加的學生的資料!");
repeat4: printf("請輸入學生學號(學號應大於0):");
scanf("%d",&stu->number);
/*輸入學號,學號應大於0*/
while(stu->number<0)
{getchar();
printf("輸入錯誤,請重新輸入學生學號:");
scanf("%d",&stu->number);}/*輸入錯誤,重新輸入學號*/
if(stu->number==0)
goto end2;/*當輸入的學號為0時,轉到末尾,結束追加*/
else
{
p3=head;
if(n>0)
{for(i=0;i<n;i++)
{if(stu->number!=p3->number)
p3=p3->next;
else
{printf("學號重復,請重輸!\n");
goto repeat4;
}
}
}
}
/******************************************************/
printf("輸入學生姓名:");
scanf("%s",stu->name);
printf("請輸入計算機 成績(0~100):");
scanf("%f",&stu->computer);
while(stu->computer<0||stu->computer>100)
{getchar();
printf("輸入錯誤,請重新輸入計算機 成績");
scanf("%f",&stu->computer);}
printf("請輸入英語成績(0~100):");
scanf("%f",&stu->english);
while(stu->english<0||stu->english>100)
{getchar();
printf("輸入錯誤,請重新輸入英語成績");
scanf("%f",&stu->english);}
printf("請輸入數學成績(0~100):");
scanf("%f",&stu->math);
while(stu->math<0||stu->math>100)
{getchar();
printf("輸入錯誤,請重新輸入數學成績");
scanf("%f",&stu->math);}
p1=head;
p0=stu;
if(head==NULL)
{head=p0;p0->next=NULL;}/*當原來鏈表為空時,從首結點開始存放資料*/
else
{
if(p1->next==NULL)
{
p1->next=p0;
p0->next=NULL;
}
else
{
while(p1->next!=NULL)
{
p2=p1;p1=p1->next;
}
p1->next=p0;
p0->next=NULL;
}
}
n=n+1;
p1=head;
p0=stu;
for(i=1;i<n;i++)
{
for(j=i+1;j<=n;j++)
{
max=p1;
p1=p1->next;
if(max->number>p1->number)
{
k=max->number;
max->number=p1->number;
p1->number=k;
strcpy(t,max->name);
strcpy(max->name,p1->name);
strcpy(p1->name,t);/*交換前後結點中的姓名,使之與學號相匹配*/
fen=max->computer;
max->computer=p1->computer;
p1->computer=fen;
fen=max->english;
max->english=p1->english;
p1->english=fen;
fen=max->math;
max->math=p1->math;
p1->math=fen;

}
}
max=head;p1=head;
} end2:
printf("現在的學生數為:%d個!\n",n);
return(head);
}
score *search(score *head)
/*函數search,功能:查詢學生成績*/
{int number;
score *p1,*p2;
printf("輸入要查詢的學生的學號,");
scanf("%d",&number);
while(number!=0)
{
if(head==NULL)
{printf("\n沒有任何學生資料!\n");return(head);}
printf("-----------------------------------------\n");
printf("|學號\t|姓名\t|計算機\t|英語\t|數學\t|\n");
printf("-----------------------------------------\n");
p1=head;
while(number!=p1->number&&p1->next!=NULL)
{p2=p1;p1=p1->next;}
if(number==p1->number)
{printf("|%d\t|%s\t|%.1f\t|%.1f\t|%.1f\t|\n",p1->number,p1->name,p1->computer,p1->english,p1->math);
printf("-----------------------------------------\n");}
else
printf("%d不存在此學生!\n",number);
printf("輸入要查詢的學生的學號,");
scanf("%d",&number);
}
printf("已經退出了!\n");
return(head);}
/*==============================================================================================*/
score *del(score *head)/*函數del,功能:刪除學生資料*/
{
score *p1,*p2;
int number;
printf("輸入要刪除的學生的學號(輸入0時退出):");
scanf("%d",&number);
getchar();
while(number!=0)/*輸入學號為0時退出*/
{
if(head==NULL)
{
printf("\n沒有任何學生資料!\n");
return(head);
}
p1=head;
while(number!=p1->number&&p1->next!=NULL)
{
p2=p1;p1=p1->next;
}
if(number==p1->number)
{
if(p1==head)
head=p1->next;
/*若p1指向的是首結點,把地二個結點地址賦予head*/
else
p2->next=p1->next;
printf("刪除:%d\n",number);n=n-1;
}
else
printf("%d不存在此學生!\n",number);
printf("輸入要刪除的學生的學號:");
scanf("%d",&number);
getchar();
}
#ifdef DEBUG
printf("已經退出了!\n");
#endif
printf("現在的學生數為:%d個!\n",n);
return(head);
}
/*==============================================================================================*/
void print(score *head)/*函數print,功能:顯示學生成績*/
{
score *p;
if(head==NULL)
{printf("\n沒有任何學生資料!\n");}
else
{printf("%d\n",n);
printf("-----------------------------------------\n");
printf("|學號\t|姓名\t|計算機\t|英語\t|數學\t|\n");
printf("-----------------------------------------\n");
p=head;
do
{printf("|%d\t|%s\t|%.1f\t|%.1f\t|%.1f\t|\n",p->number,p->name,p->computer,p->english,p->math);
printf("-----------------------------------------\n");
p=p->next;}while (p!=NULL);
}
}
/*==============================================================================================*/
score *tongji(score *head)
/*函數tongji,功能:統計學生成績*/
{
float sum1=0,sum2=0,sum3=0,ave1=0,ave2=0,ave3=0,max=0,min;
score *p;
int x,y=0,i=0;
p=head;
printf("1個人總分和平均分\t2單科平均分\t3總分最高分\t4總分最低分\n");
scanf("%d",&x);
getchar();
switch(x)
{
case 1: if(head==NULL)
{printf("\n沒有任何學生資料!\n");return(head);}
else
{
printf("---------------------------------------------------------\n");
printf("|學號\t|姓名\t|計算機\t|英語\t|數學\t|總分\t|平均分\t|\n");
printf("---------------------------------------------------------\n");
while(p!=NULL)
{
sum1=p->computer+p->english+p->math;
ave1=sum1/3;
printf("|%d\t|%s\t|%.1f\t|%.1f\t|%.1f\t|%.1f\t|%.1f\t|\n",p->number,p->name,p->computer,p->english,p->math,sum1,ave1);
printf("---------------------------------------------------------\n");/*列印表格域*/
p=p->next;}
}
return(head); break;
case 2: if(head==NULL)
{printf("\n沒有任何學生資料!\n");return(head);}
while(p!=NULL)
{
sum1=sum1+p->computer;
sum2=sum2+p->english;
sum3=sum3+p->math;/*計算總分*/
y=y+1;
ave1=sum1/y;
ave2=sum2/y;
ave3=sum3/y;
p=p->next;
}
printf("計算機 平均分是%.1f\n",ave1);
printf("英語平均分是%.1f\n",ave2);
printf("數學平均分是%.1f\n",ave3);
return(head); break;
case 3:
if(head==NULL)
{printf("\n沒有任何學生資料!\n");return(head);}
max=p->computer+p->english+p->math;
while(i<n)
{
i=i+1;
sum1=p->computer+p->english+p->math;
if(max<sum1)
max=sum1;
p=p->next;
}
printf("總分最高分:%.1f",max);
printf("\n");
return(head); break;
case 4: if(head==NULL)
{printf("\n沒有任何學生資料!\n");return(head);}
while(p!=NULL)
{
min=p->computer+p->english+p->math;
while(p!=NULL)
{sum2=p->computer+p->english+p->math;
if(min>sum2)
min=sum2;
p=p->next;
}
}
printf("總分最低分:%.1f",min);
printf("\n");
return(head); break;
default :printf("輸入錯誤,請重試!\n");
}
return(head);
}
/*==============================================================================================*/
save(score *p1)
/*函數save,功能:保存學生的資料*/
{
FILE *fp;
char filepn[20];/*用來存放文件保存路徑以及文件名*/
printf("請輸入文件路徑及文件名:");
scanf("%s",filepn);
if((fp=fopen(filepn,"w+"))==NULL)
{
printf("不能打開文件!\n");
return 0;
}
fprintf(fp,"|學號\t|姓名\t|計算機\t|英語\t|數學\t|\n");
fprintf(fp,"-----------------------------------------\n");
while(p1!=NULL)
{
fprintf(fp,"%d\t%s\t%.1f\t%.1f\t%.1f\t\n",p1->number,p1->name,p1->computer,p1->english,p1->math);
p1=p1->next;
}
fclose(fp);
printf("文件已經保存!\n");
return 0;
}
/*==============================================================================================*/
score *paixu(score *head) /*定義排序函數。此函數帶回一個指向鏈表頭的指針*/
{ score *p,*max;
int i,j,x;
float fen;
char t[10];
if(head==NULL)
{printf("\n沒有任何學生資料,請先建立鏈表!\n");return(head);}/*鏈表為空*/
max=p=head;
for(i=0;i<80;i++)
printf("*");
printf("1按學生學號排序\t2按學生姓名排序\t3按計算機 成績排序\n");
printf("4按英語成績排序\t5按數學成績排序\t\n");
for(i=0;i<80;i++)
printf("*");
printf("請選擇操作:");
scanf("%d",&x);/*選擇操作*/
getchar();
switch(x)
{case 1 :
for(i=1;i<n;i++)
{
for(j=i+1;j<=n;j++)
{
max=p;
p=p->next;

if(max->number>p->number)
{
k=max->number;
max->number=p->number;
p->number=k;
strcpy(t,max->name);
strcpy(max->name,p->name);
strcpy(p->name,t);
fen=max->computer;
max->computer=p->computer;
p->computer=fen;
fen=max->english;
max->english=p->english;
p->english=fen;
fen=max->math;
max->math=p->math;
p->math=fen;
}
}
max=head;p=head;/*重新使max,p指向鏈表頭*/
}
print(head);break;
case 2 : for(i=1;i<n;i++)
{
for(j=i+1;j<=n;j++)
{
max=p;
p=p->next;
if(strcmp(max->name,p->name)>0)/*字元串比較*/
{
strcpy(t,max->name);/*字元串復制*/
strcpy(max->name,p->name);
strcpy(p->name,t);
k=max->number;
max->number=p->number;
p->number=k;
fen=max->computer;
max->computer=p->computer;
p->computer=fen;
fen=max->english;
max->english=p->english;
p->english=fen;
fen=max->math;
max->math=p->math;
p->math=fen;
/*交換前後結點中的數學成績,使之與姓名相匹配*/
}
}
p=head;
max=head;
}
print(head);
break;

case 3 : for(i=1;i<n;i++)
{for(j=i+1;j<=n;j++)
{max=p;
p=p->next;
if(max->computer>p->computer)
{
fen=max->computer;
max->computer=p->computer;
p->computer=fen;
k=max->number;
max->number=p->number;
p->number=k;
strcpy(t,max->name);
strcpy(max->name,p->name);
strcpy(p->name,t);
fen=max->english;
max->english=p->english;
p->english=fen;
fen=max->math;
max->math=p->math;
p->math=fen;
}
}
p=head;
max=head;
}
print(head);
break;

case 4 : for(i=1;i<n;i++)
{for(j=i+1;j<=n;j++)
{max=p;
p=p->next;
if(max->english>p->english)
{
fen=max->english;
max->english=p->english;
p->english=fen;
k=max->number;
max->number=p->number;
p->number=k;
strcpy(t,max->name);
strcpy(max->name,p->name);
strcpy(p->name,t);
fen=max->computer;
max->computer=p->computer;
p->computer=fen;
fen=max->math;
max->math=p->math;
p->math=fen;
}
}
p=head;
max=head;
}
print(head);
break;
case 5 : for(i=1;i<n;i++)
{for(j=i+1;j<=n;j++)
{max=p;
p=p->next;
if(max->math>p->math)
{
fen=max->math;
max->math=p->math;
p->math=fen;
k=max->number;
max->number=p->number;
p->number=k;
strcpy(t,max->name);
strcpy(max->name,p->name);
strcpy(p->name,t);
fen=max->computer;
max->computer=p->computer;
p->computer=fen;
fen=max->english;
max->english=p->english;
p->english=fen;
}
}
p=head;
max=head;
}
print(head);
break;
default :printf("輸入錯誤,請重試! \n");
}
return (0);}
/*==============================================================================================*/
int menu(k)/*函數menu,功能:菜單選擇界面*/
{
int i;
printf("\t\t\t\t學生信息管理系統\n");
for(i=0;i<80;i++)
printf("*");
printf(" \t\t\t1添加學生記錄\t\t\t \n");
printf(" \t\t\t2.顯示學生記錄\t\t\t \n");
printf(" \t\t\t3.刪除學生記錄\t\t\t \n");
printf(" \t\t\t4.查詢學生記錄\t\t\t \n");
printf(" \t\t\t5.統計學生記錄\t\t\t \n");
printf(" \t\t\t6.排序\t\t\t \n");
printf(" \t\t\t7.保存學生記錄\t\t\t \n");
/*菜單選擇界面*/
for(i=0;i<80;i++)
printf("*");
printf("請選擇您所要的操作(選擇(0)退出):");
scanf("%d",&k);/*選擇操作*/
getchar();
return (k);}
main()
{score *head=0,*stu=0;
while(1)
{k=menu(k);
switch(k)/*用switch語句實現功能選擇*/
{case 1: head=creat();break;/*調用創建鏈表函數*/
case 2: print(head); break;/*調用顯示學生信息函數*/
case 3: head=del(head); break;/*調用刪除學生信息函數*/
case 4: head=search(head);break;/*調用成績查詢函數*/
case 5: tongji(head); break;/*調用統計函數*/
case 6: paixu(head);break;/*調用排序函數*/
case 7: save(head);break;/*調用保存函數*/
case 0: exit(0);/*退出系統,返回主界面*/
default: printf("輸入錯誤,請重試!\n"); }
}

自己套了修改!

❾ 要用C++寫個學生成績管理系統,有個類 學生。對象用對象數組保存。

CArray可以辦到,
不過你要把你的類設計好,看你不知道CArray的情況下,估計你也設計不好版類。
給你舉個例子:
class student
{
public:
operate=(const student &st);
...//屬性權
}
student::operate=(const student &st)
{
自己的屬性=st的屬性
}

CArray<student,student> ca;
student st;
ca.Add(st);
ca.GetSize();
ca.GetAt(i);
ca.RemoveAll();
...

❿ 學生成績管理系統 內容:

不知道。我是來打醬油的

熱點內容
武漢大學學生會輔導員寄語 發布:2021-03-16 21:44:16 瀏覽:612
七年級學生作文輔導學案 發布:2021-03-16 21:42:09 瀏覽:1
不屑弟高考成績 發布:2021-03-16 21:40:59 瀏覽:754
大學畢業證會有成績單 發布:2021-03-16 21:40:07 瀏覽:756
2017信陽學院輔導員招聘名單 發布:2021-03-16 21:40:02 瀏覽:800
查詢重慶2018中考成績查詢 發布:2021-03-16 21:39:58 瀏覽:21
結業考試成績怎麼查詢 發布:2021-03-16 21:28:40 瀏覽:679
14中醫醫師資格筆試考試成績查分 發布:2021-03-16 21:28:39 瀏覽:655
名著賞析課程標准 發布:2021-03-16 21:27:57 瀏覽:881
北京大學商業領袖高端培訓課程 發布:2021-03-16 21:27:41 瀏覽:919