当前位置:文档之家› 学生信息管理系统实训报告

学生信息管理系统实训报告

实训报告项目名称:学生信息管理系统系部:班级:姓名:学号:指导教师:目录第一部分、电子计算器一、实训题目与要求-------------------------------------------11、用户需求----------------------------------------------22、功能要求-----------------------------------------------3二、设计实训题目功能-----------------------------------------33、总体设计-----------------------------------------------34、界面图像-----------------------------------------------45、程序代码-----------------------------------------------9第二部分、学生成绩管理系统1、实训题目与要求---------------------------------------92、程序界面设计及代码---------------------------------16第三部分、实训总结-------------------------------------------17电子计算器实训报告第一部分、实训题目与要求1、用户需求用户可以通过在程序所提供界面上的操作来完成生活中一些简单的计算。

2、系统功能要求可以对十进制数字进行+、-、*、/、n次方、对数等简单运算。

第二部分、设计实训题目功能(1)模块设计(2)程序模块图及代码设计namespace Counter{public partial class Form1 : Form{public Form1(){InitializeComponent()}double pred ;bool predestined = true;bool KJClick = false;string strOne="";string strEnd="";int sign=0;double dblOne;double dblEnd;#region public 0到9的代码//所有0到9中要调用的代码public void Num_Evaluation(string strC) {if (KJClick == true){KJClick = false;txtBox.Text = "0";}string strY = "";if (this.txtBox.Text == "0") {this.txtBox.Text = strC; }else{strY = txtBox.Text;strY = strY + strC;txtBox.Text = strY;}predestined = true;pred = 0;//txtBox.Focus();}//0private void but0_Click(object sender, EventArgs e){Num_Evaluation("0");}//1private void but1_Click(object sender, EventArgs e){Num_Evaluation("1");}//2private void but2_Click(object sender, EventArgs e){Num_Evaluation("2");}//3private void but3_Click(object sender, EventArgs e){Num_Evaluation("3");}//4private void but4_Click(object sender, EventArgs e){Num_Evaluation("4");}//5private void but5_Click(object sender, EventArgs e){Num_Evaluation("5");}//6private void but6_Click(object sender, EventArgs e){Num_Evaluation("6");}//7private void but7_Click(object sender, EventArgs e){Num_Evaluation("7");}//8private void but8_Click(object sender, EventArgs e){Num_Evaluation("8");}//9private void but9_Click(object sender, EventArgs e){Num_Evaluation("9");}#endregion//小数点的代码private voidbutDian_Click(object sender, EventArgs e) {if (KJClick == true){KJClick = false;txtBox.Text = "0";}string strtxt = txtBox.Text; if (strtxt == "0"){return;}bool dian = false;for (int i = 0; i <strtxt.Length; i++){if (strtxt[i] == '.'){dian = true;return;}}if (dian == false){Num_Evaluation(".");}}//+/-中的代码private void butZF_Click(object sender, EventArgs e){//if(KJClick==true)//{// KJClick = false;// return;//}string strtxt = txtBox.Text; if (strtxt == "0"){return;}if (strtxt[0] == '-')//这里有个错误,有可能会超过范围{txtBox.Text =strtxt.Substring(1);}else{txtBox.Text = "-" + strtxt;}}//1/x中的代码private void butDao_Click(object sender, EventArgs e){string strtxt = txtBox.Text; if (strtxt == "0"){return;}double dblNum =double.Parse(strtxt);//double dblNum = System.Convert.ToDouble();效率没有上面的高dblNum = 1 / dblNum;txtBox.Text =dblNum.ToString();KJClick = true;}//%中的代码private void butBFH_Click(object sender, EventArgs e){txtBox.Text = "0";}//spart中的代码private void butsprt_Click(object sender, EventArgs e){string strtxt = txtBox.Text; if(strtxt=="0"){return;}double dblNum =double.Parse(strtxt);dblNum =Math.Sqrt(dblNum);txtBox.Text =dblNum.ToString();KJClick = true;}#region public 加减乘除的代码//+号中的代码private void butJia_Click(object sender, EventArgs e){sign = 1;strOne = txtBox.Text;KJClick = true;//NumSwap();}//-号中的代码private void butJian_Click(object sender, EventArgs e){sign = 2;strOne = txtBox.Text;KJClick = true;}//*号中的代码private voidbutCheng_Click(object sender, EventArgs e){sign = 3;strOne = txtBox.Text;KJClick = true;}//除号中的代码private void butChu_Click(object sender, EventArgs e){sign = 4;strOne = txtBox.Text;KJClick = true;}//=号中的代码private void butDY_Click(object sender, EventArgs e){strEnd = txtBox.Text;if (strOne == "" || strEnd == ""){return;}if (predestined){dblOne =double.Parse(strOne);dblEnd =double.Parse(strEnd);pred = dblEnd;}switch(sign){case 1:{double dblNum = dblOne + pred;txtBox.Text = dblNum.ToString();dblOne =double.Parse(txtBox.Text);predestined = false;}break;case 2:{double dblNum = dblOne - pred;txtBox.Text = dblNum.ToString();dblOne =double.Parse(txtBox.Text);predestined = false;}break;case 3:{double dblNum = dblOne * pred;txtBox.Text = dblNum.ToString();dblOne =double.Parse(txtBox.Text);predestined = false;}break;case 4:{double dblNum =dblOne / pred;txtBox.Text = dblNum.ToString();dblOne = double.Parse(txtBox.Text);predestined = false;//dblOne=屏幕上得数;// dblend不变;}break;default:{return;}}//sign = 0;KJClick = true;}#endregion}}学生成绩管理系统实训报告第一部分、实训题目与要求1、通过对学校来进行学生成绩管理系统,使此系统能够完成学生成绩的查询,学生档案管理,基本信息的存储、查询、检索。

相关主题