• 第16周总结


    ㈠、计划

    ①估计这个任务需要多少时间:9天

    ㈡、开发

    ①需求分析:

    拆成任务,编写代码

       这次作业是关于排球比赛计分程序,从排球比赛爱好着出发,希望每一个排球观众都能更好的了解比赛得分。
       作为一个排球爱好者,我希望知道排球比赛的得分,以便更好的掌握比赛得分。

       任务:a,作为排球爱好者需要知道每场A,B两队的得分;
                b,需要知道两个队每局累加得分;
                c,两队比分哪一队胜出,怎么表示出来;

    ②生成设计文档:

    表现层:①观众

    (代码实现方式:winform窗体)

    业务层: 判断

    数据源:——→DB

    ③设计复审

      3个小时

    ④代码规范(为目前的开发制定合适的规范)

    ⑤具体设计:

    把每一场的比分存到数据库中,在窗体控件中选择某一场,显示比分。

    ⑥具体编码:

    int sumA = 0;
    int sumB = 0;
    Boolean i = true;
    Boolean j = true;
    Boolean m = true;
    Boolean n = true;
    Boolean o = true;
    int shengchang = 0;
    int bshengchang = 0;

    private void cmb1_SelectedValueChanged(object sender, EventArgs e)
    {

    if (this.cmb1.Text.Equals("第一场")) {

    this.txt1.Text = "26";
    this.txt2.Text = "24"; 
    if (i)
    {
    int a = int.Parse(txt1.Text);
    int b = int.Parse(txt2.Text);
    sumA += a;
    sumB += b;
    this.sumGrade(sumA, sumB);
    i = false;
    if (a > b) {
    shengchang++;
    this.textBox3.Text = shengchang.ToString();
    }
    else if (a < b) {
    bshengchang++;
    this.textBox4.Text = bshengchang.ToString();
    }
    }

    }
    else if (this.cmb1.Text.Equals("第二场"))
    {
    this.txt1.Text = "25";
    this.txt2.Text = "27";


    if (j) {
    int a = int.Parse(txt1.Text);
    int b = int.Parse(txt2.Text);
    sumA += a;
    sumB += b;
    this.sumGrade(sumA, sumB);
    j = false;
    if (a > b) {
    shengchang++;
    this.textBox3.Text = shengchang.ToString();
    }
    else if (a < b)
    {
    bshengchang++;
    this.textBox4.Text = bshengchang.ToString();

    }
    }
    }

    以下省略部分

    public void sumGrade(int a,int b) {
    this.textBox1.Text = a.ToString();
    this.textBox2.Text = b.ToString() ;
    }

    private void button1_Click(object sender, EventArgs e)
    {
    sumA = 0;
    sumB = 0;
    i = true;
    j = true;
    m = true;
    n = true;
    o = true;
    shengchang = 0;
    bshengchang = 0;
    this.textBox1.Text = "";
    this.textBox2.Text = "";
    this.textBox3.Text = "";
    this.textBox4.Text = "";
    this.txt1.Text = "";
    this.txt2.Text = "";
    this.cmb1.Text = "";
    }

    ⑦代码复审:4个小时

    ⑧测试(自测、修改代码、提交代码): 半小时

    ㈢、报告

    ①测试报告:

    ②计算工作量:

     
  • 相关阅读:
    【Linux下Inotify + Rsync文件实时同步】
    Nginx升级到1.0.2最新稳定版
    【Nginx+Tomcat+Session 高性能群集搭建】
    HttpException (0x80072749): Unable to make the session state request to the session state server
    there is no source code available for the current location 解决方案
    CHARINDEX和PATINDEX函数 详解
    COMException was unhandled:Old format or invalid type library
    ASP.NET MVC 开源项目 收集
    Drupal Installation:Failed to connect to your MySQL database server
    Sql Server建表时设置双主键及列名以数字开头的解决方法
  • 原文地址:https://www.cnblogs.com/zxcv5678/p/6219862.html
Copyright © 2020-2023  润新知