c#任务书.docx

上传人:b****6 文档编号:8251885 上传时间:2023-01-30 格式:DOCX 页数:14 大小:34.21KB
下载 相关 举报
c#任务书.docx_第1页
第1页 / 共14页
c#任务书.docx_第2页
第2页 / 共14页
c#任务书.docx_第3页
第3页 / 共14页
c#任务书.docx_第4页
第4页 / 共14页
c#任务书.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

c#任务书.docx

《c#任务书.docx》由会员分享,可在线阅读,更多相关《c#任务书.docx(14页珍藏版)》请在冰豆网上搜索。

c#任务书.docx

c#任务书

中南民族大学

C#课程设计报告

(公选)

题目

学生成绩管理系统

学院

计算机科学学院

专业

班级

学号

姓名

指导教师

2010

6

23

 

一.摘要

   学生成绩管理系统是一个教育单位不可缺少的部分,它对于学校的学生和管理者来说都是至关重要的,所以学生成绩管理系统应该能够为用户提供充足的信息和快捷的查询手段。

但一直以来人们使用传统人工的方式管理成绩系统,这种管理方式存在着许多缺点,如:

效率低、保密性差,另外时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。

    作为计算机应用的一部分,使用计算机对学生成绩信息进行管理,具有手工管理所无法比拟的优点.例如:

检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。

这些优点能够极大地提高学生成绩管理的效率,也是企业的科学化、正规化管理,是与世界接轨的重要条件。

    此次的毕业设计,我使用 MICROSOFT公司的 VISUAL C++开发工具,利用其提供的各种开发工具,首先在短时间内建立系统应用原型,然后,对初始原型系统进行需求迭代,不断修正和改进,直到形成用户满意的可行性系统。

关键词:

学生成绩管理系统 功能 特点

Abstract

The importance function of the paper include user’s management,deleting student’s information,adding student’s information,amending student’s information,searching information with different conditions,arranging information with different demands.And it contents statement of demand,design of a data base and so on.In addition,this paper introduced the systematical realization in detail and the conclusion and experience in the system development and study process.

Keywords:

 Management system of student's results,function,characteristic

二、题目

学生成绩管理系统

三、目的与要求

1. 目的:

1)要求学生达到熟练掌握.NET基本结构以及C#语言的基本知识和技能;

2)基本掌握面向对象程序开发的基本思路和方法;

3)*掌握ADO.NET数据库开发基本知识;

4)能够利用所学的基本知识和技能,进行简单数据库应用程序设计。

2. 要求 

基本要求:

1)要求利用C#的编程思想以及组件开发原理来完成系统的设计; 

2)突出C#语言与其它语言不同点(即体现C#的高级功能,如属性概念、接口、事件、委托等);

3)体现可视化编程基本东西,如系统带有菜单、工具栏、状态栏以及一些常用的高级控件。

创新要求:

在基本要求达到后,可进行创新设计,如把系统转化为组件、给系统在数据方面具有导入导出功能等。

四、信息描述

详细设计规划有关该系统基本信息的描述,如:

学生信息(学号、姓名、性别等),各系部信息、教学计划信息(如学期、课程代码、含义等)等等。

五、功能描述

1. 成绩的输入。

2. 成绩的查询与修改。

3. 成绩的分析。

4. 成绩的统计。

5. 报表打印。

6. 权限设置。

7. 帮助等。

五、解决方案

1. 首先进行需求分析,搞清楚系统功能和任务。

2. 然后总体设计中确定模块结构,划分功能模块,将软件功能需求分配给所划分的最小单元模块。

确定模块间的联系,确定数据结构、文件结构、数据库模式,确定测试方法与策略。

3. 详细设计中为每个模块确定采用的算法,选择适当的工具表达算法的过程(流程图),描述模块的详细过程;确定每一模块使用的数据结构;确定模块接口的细节,包括对系统外部的接口和用户界面,对系统内部其它模块的接口。

4. 依据分析编写C#代码。

完整的程序如下:

实体类:

Student

 

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Text;

namespace成绩管理系统

{

   classStudent:

IComparable

   {

       privatestringstuName;//学生姓名

       publicstringStuName

       {

           get{returnstuName;}

         // set{stuName=value;}

       }

       privateintmathScore;//高数成绩

       publicintMathScore

       {

           get{returnmathScore;}

           set{mathScore=value;}

       }

       privateintenglishScore;//英语成绩

       publicintEnglishScore

       {

           get{returnenglishScore;}

           set{englishScore=value;}

       }

       privateintspecScore;//专业成绩

       publicintSpecScore

       {

           get{returnspecScore;}

           set{specScore=value;}

       }

       privateinttotalScore1;

       publicintTotalScore1

       {

           get{returntotalScore1=mathScore+englishScore+specScore;}

           set{totalScore1=value;}

       }

       publicStudent(stringname,intmath,intenglish,intspec)

       {

           this.stuName=name;

           this.mathScore=math;

           this.englishScore=english;

           this.specScore=spec;

       }

       //计算成绩的方法

       publicintTotalScore()

       {

           intsum=mathScore+englishScore+specScore;

           returnsum;

       }

       //实现泛型借口中的方法

       publicintCompareTo(Studentother)

       {

           returnthis.TotalScore().CompareTo(other.TotalScore());

       }

       //重写String的方法

       publicoverridestringToString()

       {

           returnbase.ToString();

       }

   }

}

实体类:

Form1

 

usingSystem;

usingSystem.Collections.Generic;

usingSystem.ComponentModel;

usingSystem.Data;

usingSystem.Drawing;

usingSystem.Text;

usingSystem.Windows.Forms;

usingSystem.IO;

namespace成绩管理系统

{

   publicpartialclassfrmLogin:

Form

   {

       publicfrmLogin()

       {

           InitializeComponent();

       }

       #region窗体加载

       privatevoidfrmLogin_Load(objectsender,EventArgse)

       {

           this.skinEngine1.SkinFile="SportsOrange.ssk";

       }

       #endregion

       #region登陆检测

       privatevoidbtnOk_Click(objectsender,EventArgse)

       {

           boolflag=false;

           StreamReadersr=newStreamReader(@"Administrator.txt",Encoding.UTF8);

           stringuname,upwd;

           while(sr.Peek()!

=-1)

           {

               uname=sr.ReadLine();

               upwd=sr.ReadLine();

               if(uname.Equals(this.txtName.Text.Trim())&&upwd.Equals(this.txtPwd.Text.Trim()))

               {

                   flag=true;

                   break;

               }

               sr.ReadLine();

           }

           sr.Close();

           if(flag==false)

           {

               MessageBox.Show("用户名或密码错误!

","错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

           }

           else

           {

               this.progressBar1.Maximum=50;

               this.progressBar1.Value=0;

               Timertimer=newTimer();

               timer.Interval=1000;

               timer.Tick+=newEventHandler(timer1_Tick);

               timer.Start();

               for(inti=0;i<50;i++)

               {

                   this.progressBar1.Value++;

               }

           }

       }

       #endregion

       #region时间计算

       privatevoidtimer1_Tick(objectsender,EventArgse)

       {

           if(this.progressBar1.Value==this.progressBar1.Maximum)

           {

               ((Timer)sender).Stop();

               this.Hide();

               Form2frm=newForm2();

               frm.Show();

           }

       }

       #endregion

       #region 退出

       privatevoidbtnQuit_Click(objectsender,EventArgse)

       {

           if(MessageBox.Show("你真的要退出么?

","退出提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question)==DialogResult.Yes)

           {

               Application.Exit();

           }

       }

       #endregion

   }

}

实体类:

Form2

 

usingSystem;

usingSystem.Collections.Generic;

usingSystem.ComponentModel;

usingSystem.Data;

usingSystem.Drawing;

usingSystem.Text;

usingSystem.Windows.Forms;

namespace成绩管理系统

{

   publicpartialclassForm2:

Form

   {

       publicForm2()

       {

           InitializeComponent();

       }

       ListlistStu=newList();//泛型

       privatevoidForm2_Load(objectsender,EventArgse)

       {

           timer1.Enabled=true;

           this.skinEngine1.SkinFile="SportsOrange.ssk";

       }

       #region验证数据是否合法

       privateboolIsValidate()

       {

           //验证姓名

           stringstrname=this.txtSname.Text.Trim();

           if(strname.Length==0)

           {

               MessageBox.Show("姓名不能为空!

","错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

               this.txtSname.Focus();

               returnfalse;

           }

           else

           {

               foreach(StudentsinlistStu)

               {

               if(txtSname.Text==s.StuName)

               {

                   MessageBox.Show("姓名已经存在!

","错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

                   this.txtSname.Focus();

                   this.txtSname.SelectAll();

                   returnfalse;

               }

               }

           }

           //验证高数成绩

           stringstrmath=this.txtSmath.Text.Trim();

           if(strmath.Length==0)

           {

               MessageBox.Show("高数成绩不能为空!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

               this.txtSmath.Focus();

              returnfalse;

           }

           try

           {

               intmath=int.Parse(strmath);

               if(math<0||math>100)

               {

                   MessageBox.Show("高数成绩输入不再范围内!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

                   this.txtSmath.Focus();

                   this.txtSmath.SelectAll();

                   returnfalse;

               }

           }

           catch(FormatExceptione)

           {

               MessageBox.Show("高数成绩只能是整数!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

               this.txtSmath.Focus();

               this.txtSmath.SelectAll();

               returnfalse;

           }

           //验证英语成绩

           stringstrEnglish=this.txtSenglish.Text.Trim();

           if(strEnglish.Length==0)

           {

               MessageBox.Show("英语成绩不能为空!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

               this.txtSenglish.Focus();

               returnfalse;

           }

           try

           {

               intenglish=int.Parse(strEnglish);

               if(english<0||english>100)

               {

                   MessageBox.Show("英语成绩输入不再范围内!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

                   this.txtSenglish.Focus();

                   this.txtSenglish.SelectAll();

                    returnfalse;

               }

           }

           catch(FormatExceptione)

           {

               MessageBox.Show("英语成绩只能是整数!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

               this.txtSenglish.Focus();

               this.txtSenglish.SelectAll();

               returnfalse;

           }

           //验证专业成绩

           stringstrOwn=this.txtSown.Text.Trim();

           if(strOwn.Length==0)

           {

               MessageBox.Show("专业成绩不能为空!

","数据错误",MessageBoxButtons.OK,MessageBoxIcon.Error);

               this.txtSown.Focus();

               returnfalse;

           }

           try

           {

           

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

当前位置:首页 > IT计算机 > 互联网

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1