资源描述
精品文档就在这里
-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有--------------
--------------------------------------------------------------------------------------------------------------------------------------------
学生信息管理系统
——软件开发计划书
专业班级:通信工程09-2
姓名:盛玉娇
学号:2220091731
一、系统的名称:
学生信息管理系统
二、设计目的
学生管理系统的开发目的是为了实现学生课程、学籍的信息化管理。本系统需要完成的功能有:操作、查询、成绩统计、排名。
1.操作:可对学籍管理进行添加、删除、修改等功能。
2.查询:可对学生学籍按姓名、总成绩查询及所有学生的学籍数据。
3.成绩统计:可以统计每个学生的平均成绩、各科不及格人数。
4.排名:按总分进行排名。
三、开发工具:
microsoft visual c++
四、系统总体结构
五、模块流程
1、 操作模块
2、 查询模块
3、 统计模块
4、 排名模块
六、运行
输入程序代码(见附录),运行,录入数据,分别实现操作、查询、统计、排序等功能。生成文件。
七、参考资料
C#程序设计
计算机软件基础
附录:
void main()
{
cout<<"*****************欢迎来到学生成绩查询系统*****************"<<endl;
cout<<"请选择您需要的操作!"<<endl; //菜单的输出
cout<<"操作:"<<endl;
cout<<"(1)数据录入"<<endl;
cout<<"(2)增加学生"<<endl;
cout<<"(3)删除学生"<<endl;
cout<<"(4)修改数据"<<endl;
cout<<"查询:"<<endl;
cout<<"(5)按总成绩查询"<<endl;
cout<<"(6)按姓名查询"<<endl;
cout<<"(7)输出所有学生的数据"<<endl;
cout<<"成绩统计:"<<endl;
cout<<"(8)每个学生的平均成绩"<<endl;
cout<<"(9)各科不及格人数"<<endl;
cout<<"排名:"<<endl;
cout<<"(10)按总分查询排名"<<endl;
cout<<"(11)退出"<<endl;
cout<<"选择相关操作请输入相对的括号里的阿拉伯数字及字母!"<<endl;
int p=0; //全局变量,用于选择菜单时的输入
char w;//全局变量,用于在大项中选择是否继续操作
Tstu *s[100]; //类定义的指针将所录入的数据按类中的形式分别存储
ofstream *file[100];
int i=0; //全局变量,用于做每个录入数据的下标
int j=0;
int chris1=0; //用于判断do-while语句
do //判断输入是否正确
本系统共分为三大部分:
1、 登录模块
#include<iostream>
#include<string>
#include<fstream>
#include<sstream>
#include<iomanip>
using namespace std;
class Tstu //通过定义一个类来定义数据录入的函数
{
char name[20];
int number;
float math,cpp,english,average,sum;
public:
Tstu()
{};
Tstu ( char n[20], int num,float ma,float cj,float eng ) ;
float getsum();//得到总分的函数
float getaver(); //得到平均分的函数
friend void main(); //将主函数定义为友元函数,方便访问类中的成员
};
Tstu::Tstu ( char n[20], int num,float ma,float cj,float eng )
{
strcpy(name,n); //得到姓名
number=num; //得到学号
math=ma; //得到数学成绩
cpp=cj; //得到c++成绩
english=eng; //得到英语成绩
}
float Tstu::getsum() //得到总分的函数
{
sum=cpp+english+math;
return sum;
}
float Tstu::getaver() //得到平均分的函数
{
average=getsum()/3;
return average;
}
void main()
{
cout<<"*****************欢迎来到学生成绩查询系统*****************"<<endl;
cout<<"请选择您需要的操作!"<<endl; //菜单的输出
cout<<"操作:"<<endl;
cout<<"(1)数据录入"<<endl;
cout<<"(2)增加学生"<<endl;
cout<<"(3)删除学生"<<endl;
cout<<"(4)修改数据"<<endl;
cout<<"查询:"<<endl;
cout<<"(5)按总成绩查询"<<endl;
cout<<"(6)按姓名查询"<<endl;
cout<<"(7)输出所有学生的数据"<<endl;
cout<<"成绩统计:"<<endl;
cout<<"(8)每个学生的平均成绩"<<endl;
cout<<"(9)各科不及格人数"<<endl;
cout<<"排名:"<<endl;
cout<<"(10)按总分查询排名"<<endl;
cout<<"(11)退出"<<endl;
cout<<"选择相关操作请输入相对的括号里的阿拉伯数字及字母!"<<endl;
int p=0; //全局变量,用于选择菜单时的输入
char w;//全局变量,用于在大项中选择是否继续操作
Tstu *s[100]; //类定义的指针将所录入的数据按类中的形式分别存储
ofstream *file[100];
int i=0; //全局变量,用于做每个录入数据的下标
int j=0;
int chris1=0; //用于判断do-while语句
do //判断输入是否正确
{
cin>>p;
if((p>=1&&p<=11))
chris1=1;
else
cout<<"指令错误!请重新输入:"<<endl;
}while(chris1==0);
do{
switch(p)
{
case 1: //数据的录入
{
char c; //用于在小项中选择是否继续操作
char name[20];
int number;
float math,cpp,english;
do{
cout<<"请输入姓名:"<<endl;
cin>>name;
cout<<"请输入学号:"<<endl;
cin>>number;
cout<<"请输入数学成绩:"<<endl;
cin>>math;
cout<<"请输入C++成绩:"<<endl;
cin>>cpp;
cout<<"请输入英语成绩:"<<endl;
cin>>english;
fstream outfile,infile; //作一个文本文档在文件夹中用于显示所录入的数据
outfile.open("f1.txt",ios::out|ios::app);
if(!file)
{ cout<<"f1.txt can not open.\n";
return;
}
outfile<<name<<" "<<"学号:"<<number<<" "<<"数学成绩:"<<math<<" "<<"C++成绩:"<<cpp<<" "<<"外语成绩:"<<english<<endl;
outfile.close();
infile.open("f1.txt",ios::in);
if(!file) //判断文件是否打开
{ cout<<"f1.txt can not open.\n";
return;
}
char ch;
while(infile.get(ch))
cout<<ch;
cout<<endl;
infile.close();
j++;
s[i]=new Tstu(name, number,math, cpp, english);
i++;
cout<<"数据录入成功,想继续录入吗(y/n)"<<endl;
cin>>c;
chris1=0;
do{
if(c!='y'&&c!='n')
{ cout<<"指令错误!请重新输入!"<<endl;
cin>>c;
}
else
chris1=1;
}while(chris1==0);
}while(c=='y'); //重复输入
break;
}
case 2: //增加学生数据
{
char name[20];
int number;
float math,cpp,english;
char c;
do
{
cout<<"请输入您要增加的学生的姓名:"<<endl;
cin>>name;
cout<<"请输入你要增加的学生的学号:"<<endl;
cin>>number;
cout<<"请输入数学成绩:"<<endl;
cin>>math;
cout<<"请输入C++成绩:"<<endl;
cin>>cpp;
cout<<"请输入英语成绩:"<<endl;
cin>>english;
fstream outfile,infile;
outfile.open("f1.txt",ios::out|ios::app);
if(!file)
{
cout<<"f1.txt can not open.\n";
return;
}
outfile<<name<<" "<<"学号:"<<number<<" "<<"数学成绩:"<<math<<" "<<"C++成绩:"<<cpp<<" "<<"外语成绩:"<<english<<endl;
outfile.close();
infile.open("f1.txt",ios::in);
if(!file)
{
cout<<"f1.txt can not open.\n";
return;
}
char h;
while(infile.get(h))
cout<<h;
cout<<endl;
infile.close();
j++;
s[i]=new Tstu(name,number, math, cpp, english);
i++;
cout<<"数据录入成功,想继续录入吗(y/n)"<<endl;
cin>>c;
if(c!='y'&&c!='n')
{
cout<<"指令错误!请重新输入!"<<endl;
cin>>c;
}
}while(c=='y');
break;
}
case 3://删除学生信息
{
char c;
string xingming,line,str,name;
do
{ ifstream fin("f1.txt");
fstream outfile("f2.txt",ios::trunc|ios::out); //作一个文本文档在文件夹中用于显示所录入的数据
cout<<"请输入您要删除的学生的姓名:"<<endl;
cin>>xingming;
while(!fin.eof() )
{
getline(fin,line);
istringstream stream(line);
name = line.substr(0,line.find(" ",0));//找到名字,判断是否相等
if(name != xingming)
outfile<<line<<endl;
}
outfile.close();
fin.close();
fstream f("f1.txt",ios::trunc|ios::out);
ifstream outf("f2.txt");
f<<outf.rdbuf();
outf.close();
f.close();
cout<<"数据删除成功,想继续删除吗(y/n)"<<endl;
cin>>c;
if(c!='y'&&c!='n')
{
cout<<"指令错误!请重新输入!"<<endl;
cin>>c;
}
}while(c=='y');
break;
}
case 4://修改数据
{
string sname,line,str,name;
int nu;float eng,ma,com;int flag;char c;
if(i==0)
{
cout<<"系统中没有输入数据,请先输入数据!"<<endl;break;
}
do
{
flag=0;
cout<<"请输入您要修改的学生的姓名:";
cin>>name;
fstream fin("f1.txt",ios::in);
ofstream outfile("f.txt",ios::trunc|ios::out);
cout<<endl;
while(!fin.eof() ) //在文件中查找
{
getline(fin,line);
istringstream stream(line);
sname = line.substr(0,line.find(" ",0));
if(name!=sname)
{
outfile<<line<<endl;
}
else flag=1;
}
fin.close();
if(flag=1)
{
cout<<"请输入修改学生姓名及其新学号,数学,c++和英语成绩:";
cin>>name>>nu>>ma>>com>>eng;
cout<<endl;
outfile<<name<<" "<<"学号:"<<nu<<" "<<"数学成绩:"<<ma<<" "<<"C++成绩:"<<com<<" "<<"外语成绩:"<<eng<<endl;
outfile.close();
fstream outf("f1.txt",ios::trunc|ios::out);
fstream inf("f.txt",ios::in);
outf<<inf.rdbuf()<<endl;
outf.close();
inf.close();
}
if(flag=0)cout<<"对不起,您要修改的学生不存在!请查证后输入!"<<endl;
cout<<"想继续修改吗(y/n):";
cin>>c;
cout<<endl;
if(c!='y'&&c!='n')
{
cout<<" 指令错误!请重新输入!"<<endl<<" ";
cin>>c;
}
}while(c=='y');
break;
}
case 5://按总分查询
{
int j=0;float SUM;char c;int flag;
if(i==0)
{
cout<<"系统中没有输入数据,请先输入数据!"<<endl;break;
}
do
{
flag=0;
cout<<"请输入您要查询的学生的总成绩:"<<endl;
cin>>SUM;
for(int j=0;j<i;j++)
{
if(s[j]->getsum()==SUM)
{
flag=1;
cout<<"您要查询的学生是:"<<(*s[j]).name<<endl;
cout<<"该生的信息为:"<<endl;
cout<<" 学号:"<<(*s[j]).number<<" 数学分数:"<<(*s[j]).math<<" c++分数:"<<(*s[j]).cpp<<" 英语分数"<<(*s[j]).english<<endl;
}
}
if(flag==0)cout<<"对不起!您要查询的学生不存在!"<<endl;
cout<<"是否继续查?(y/n):";
cin>>c;
if(c!='y'&&c!='n')
{
cout<<"指令错误!请重新输入!"<<endl;
cin>>c;
};
}while(c=='y');
break;
}
case 6://按姓名查询
{
char n[20];char c;int j=0;int flag;
if(i==0)
{
cout<<"系统中没有输入数据,请先输入数据!"<<endl;break;
}
do
{
flag=0;
cout<<"请输入要查询的名字: "<<endl;
cin>>n;
for(int j=0;j<i;j++)
{
if(strcmp(n,(*s[j]).name)==0)
{
flag=1;
cout<<"您要查询的学生是:"<<(*s[j]).name<<endl;
cout<<"该生的信息是:学号:"<<(*s[j]).number<<" 数学分数:"<<(*s[j]).math<<"c++分数:"<<(*s[j]).cpp<<"英语分数:"<<(*s[j]).english<<endl;
}
}
if(flag==0)
cout<<"对不起您要查询的学生不存在,请查证后再输入!"<<endl;
cout<<"您想继续查询吗?(y/n):";
cin>>c;
if(c!='y'&&c!='n')
{
cout<<"指令错误!请重新输入:"<<endl;
cin>>c;
}
}while(c=='y');
break;
}
case 7://输出所有学生数据
{
cout<<"所有学生数据如下:"<<endl;
ifstream file;
file.open("f1.txt",ios::in);
cout<<file.rdbuf();
file.close();
break;
}
case 8://统计每个学生的平均成绩
{
if(i==0)
{
cout<<"系统中没有输入数据,请先输入数据!"<<endl;break;
}
for(int m=0;m<i;m++)
{
cout<<(*s[m]).name<<" 学号:"<<(*s[m]).number<<" 总分:"<<(*s[m]).getsum()<<" 均分:"<<(*s[m]).getaver()<<endl;
}
break;
}
case 9://统计各学科不及格人数
{
if(i==0)
{
cout<<"系统中没有输入数据,请先输入数据!"<<endl;break;
}
int m,n,k,j;m=0;n=0;k=0;
for(j=0;j<i;j++)
{
if(s[j]->math<60)m++;
if(s[j]->cpp<60)n++;
if(s[j]->english<60)k++;
}
cout<<"数学不及格人数为:"<<m<<endl;
cout<<"c++不及格人数为:"<<n<<endl;
cout<<"英语不及格人数为:"<<k<<endl;
break;
}
case 10://按总分排名
{
if(i==0)
{
cout<<"系统中没有输入数据,请先输入数据!"<<endl;break;
}
int h,g,n;int j=0;float a[100],temp;
for(g=0;g<i;g++)
{
a[j]=(*s[g]).getsum();j++;
}
for(h=0;h<i;h++)
{for(n=0;n<i-h;n++)
if(a[n]>a[n+1])
{
temp=a[n];a[n]=a[n+1];a[n+1]=temp;
}
}
for(n=1;n<=i;n++)
cout<<a[n]<<endl;
break;
}
}
cout<<" 您想继续进行其他操作吗?(y/n):";
int flag=0;
do
{
cin>>w;
cout<<endl;
if(w!='y'&&w!='n')
cout<<" 指令错误!请重新输入!"<<endl;
else
flag=1;
}while(flag==0);
if(w=='y')
{
cout<<"*****************欢迎来到学生成绩查询系统*****************"<<endl;
cout<<"请选择您需要的操作!"<<endl; //菜单的输出
cout<<"操作:"<<endl;
cout<<"(1)数据录入"<<endl;
cout<<"(2)增加学生"<<endl;
cout<<"(3)删除学生"<<endl;
cout<<"(4)修改数据"<<endl;
cout<<"查询:"<<endl;
cout<<"(5)按总成绩查询"<<endl;
cout<<"(6)按姓名查询"<<endl;
cout<<"(7)输出所有学生的数据"<<endl;
cout<<"成绩统计:"<<endl;
cout<<"(8)每个学生的平均成绩"<<endl;
cout<<"(9)各科不及格人数"<<endl;
cout<<"排名:"<<endl;
cout<<"(10)按总分查询排名"<<endl;
cout<<"(11)退出"<<endl;
cout<<"选择相关操作请输入相对的括号里的阿拉伯数字及字母!"<<endl;
cin>>p;
}
}while(w=='y');
}
2010年读书节活动方案
一、 活动目的:
书是人类的朋友,书是人类进步的阶梯!为了拓宽学生的知识面,通过开展“和书交朋友,遨游知识大海洋”系列读书活动,激发学生读书的兴趣,让每一个学生都想读书、爱读书、会读书,从小养成热爱书籍,博览群书的好习惯,并在读书实践活动中陶冶情操,获取真知,树立理想!
二、活动目标:
1、通过活动,建立起以学校班级、个人为主的班级图书角和个人小书库。
2、通过活动,在校园内形成热爱读书的良好风气。
3、通过活动,使学生养成博览群书的好习惯。
4、通过活动,促进学生知识更新、思维活跃、综合实践能力的提高。
三、活动实施的计划
1、 做好读书登记簿
(1) 每个学生结合实际,准备一本读书登记簿,具体格式可让学生根据自己喜好来设计、装饰,使其生动活泼、各具特色,其中要有读书的内容、容量、实现时间、好词佳句集锦、心得体会等栏目,高年级可适当作读书笔记。
(2) 每个班级结合学生的计划和班级实际情况,也制定出相应的班级读书目标和读书成长规划书,其中要有措施、有保障、有效果、有考评,简洁明了,易于操作。
(3)中队会组织一次“读书交流会”展示同学们的读书登记簿并做出相应评价。
2、 举办读书展览:
各班级定期举办“读书博览会”,以“名人名言”、格言、谚语、经典名句、“书海拾贝”、“我最喜欢的___”、“好书推荐”等形式,向同学们介绍看过的新书、好书、及书中的部分内容交流自己在读书活动中的心得体会,在班级中形成良好的读书氛围。
3、 出读书小报:
---------------------------------------------------------精品 文档---------------------------------------------------------------------
展开阅读全文