学生成绩管理终极版Word格式文档下载.docx

上传人:b****1 文档编号:400328 上传时间:2023-04-28 格式:DOCX 页数:18 大小:87.39KB
下载 相关 举报
学生成绩管理终极版Word格式文档下载.docx_第1页
第1页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第2页
第2页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第3页
第3页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第4页
第4页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第5页
第5页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第6页
第6页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第7页
第7页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第8页
第8页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第9页
第9页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第10页
第10页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第11页
第11页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第12页
第12页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第13页
第13页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第14页
第14页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第15页
第15页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第16页
第16页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第17页
第17页 / 共18页
学生成绩管理终极版Word格式文档下载.docx_第18页
第18页 / 共18页
亲,该文档总共18页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

学生成绩管理终极版Word格式文档下载.docx

《学生成绩管理终极版Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《学生成绩管理终极版Word格式文档下载.docx(18页珍藏版)》请在冰点文库上搜索。

学生成绩管理终极版Word格式文档下载.docx

2选择1时输入学生成绩信息

3选择2时查询学生成绩

4选择3时删除学生成绩信息

5选择4时修改学生成绩信息

6选择5时输出学生成绩信息

7选择6时退出程序

学生成绩信息管理代码

#include<

stdio.h>

stdlib.h>

string.h>

iostream.h>

fstream.h>

structClass

{intChinese;

intMath;

intEnglish;

};

classStudent{

public:

Student();

voidOfile(ofstream&

of);

voidInfile(ifstream&

f);

voidOut();

voidSet(char*name,intno,Classscore);

char*GetName();

intGetNo();

Student*Next;

protected:

charName[20];

intNo;

ClassScore;

Student:

:

Student():

Next(0){}

char*Student:

GetName(){returnName;

}

intStudent:

GetNo(){returnNo;

}

voidStudent:

Set(char*name,intno,Classscore)

{strcpy(Name,name);

No=no;

Score=score;

Infile(ifstream&

f)

{f>

>

Name>

No>

Score.Chinese>

Score.Math>

Score.English;

Ofile(ofstream&

of)

{of<

<

"

"

Name<

No<

Score.Chinese<

Score.Math<

Out()

{cout<

\t"

\t\t"

Score.English<

endl;

classFunction

{public:

Function();

~Function();

voidMenu();

voidAdd();

voidSearch();

voidDelete();

voidModify();

voidShow();

private:

Student*Student_First;

voidRead();

voidSave();

Function:

Function()

{Student_First=newStudent;

Read();

~Function()

{deleteStudent_First;

voidFunction:

Add()

{charname[20];

intno;

Classscore;

charchoose;

Student*f1,*p,*f2;

system("

cls"

);

f1=Student_First;

f2=Student_First->

Next;

while(f1->

Next)

f1=f1->

do

{p=newStudent;

cout<

请输入您要添加的学生成绩信息:

请输入学生姓名:

;

cin>

name;

while(f2)

{if(strcmp(f2->

GetName(),name)==0)

{cout<

该学生已存在,请确定姓名!

\n\n"

cout<

请输入姓名:

break;

}

f2=f2->

}

请输入学号:

no;

请输入语文成绩:

cin>

score.Chinese;

请输入数学成绩:

score.Math;

请输入英语成绩:

score.English;

p->

Set(name,no,score);

f1->

Next=p;

Next=NULL;

是否继续输入信息?

(Y\\N)"

choose;

}while(choose=='

y'

||choose=='

Y'

Save();

cout<

1.返回主菜单"

while(choose!

='

1'

{cout<

}

Menu();

Delete()

{charname[20];

Student*temp,*p;

p=temp=Student_First->

输入学号:

while(temp)

{if(strcmp(temp->

GetName(),name)==0&

&

temp->

GetNo()==no)

{cout<

姓名\t学号\t语文成绩\t数学成绩\t英语成绩\n"

temp->

Out();

cout<

\n是否删除(Y/N)"

if(choose=='

{p->

Next=temp->

deletetemp;

删除成功:

\n"

break;

p=temp;

temp=temp->

1.返回主菜单\n2.继续删除"

choose!

2'

Menu();

elseif(choose=='

Delete();

Modify()

{charchoose,name[20];

temp=p=Student_First;

请输入您要修改的学生姓名:

GetName(),name)==0)

temp->

temp=temp->

修改成功!

1.返回主菜单\n2.继续修改"

Modify();

Read()

{Student*p,*p2;

p=Student_First;

ifstreamis("

Student.txt"

ios:

in);

if(!

is)

{ofstreamos("

out);

os.close();

return;

while(!

is.eof())

{p2=newStudent;

p2->

Infile(is);

p->

Next=p2;

p=p->

Save()

{ofstreamof("

Student*p=Student_First->

while(p)

{p->

Ofile(of);

p=p->

of.close();

Search()

{intflag(0);

chart1[20];

intt2;

Student*temp=Student_First->

输入查询方式:

\n1.按姓名查询\n2.按学号查询\n"

if(choose=='

请输入您要查询的姓名:

cin>

t1;

while(temp)

{if(strcmp(t1,temp->

GetName())==0)

{flag=1;

break;

}

temp=temp->

if(flag==0)

\n无该学生的信息\n"

else

temp->

elseif(choose=='

请输入您要查询的学号"

t2;

{if(t2==temp->

GetNo())

}while(choose!

||choose!

\n1.返回主菜单\n2.继续查询"

1.返回主菜单\n2.继续查询"

Search();

Show()

{charchoose;

Student*temp;

temp=Student_First->

temp)

文件无数据\n\n"

else

while(temp!

=NULL)

{temp->

Menu()

{

charchoose;

课程设计----覃介最"

********************学生成绩管理**********************"

endl<

1.录入学生成绩信息:

2.查询学生成绩信息:

3.删除学生成绩信息:

4.修改学生成绩信息:

5.输出学生成绩信息:

cout<

6.退出系统"

*********************************************************"

switch(choose)

{case'

Add();

break;

case'

Search();

3'

Delete();

4'

Modify();

5'

Show();

6'

exit

(1);

default:

请按规定输入选择项!

Menu();

voidmain()

{Functionfunction;

function.Menu();

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2