zoukankan      html  css  js  c++  java
  • 十六周个人作业

    1、计划:半月

    2、需求分析
    用户故事:作为一个观众,我希望了解某一场比赛的比分,以便了解赛况。(满意条件:精确到每一局的结果比分)。
    3、生成设计文档:


    4、设计复审:三个小时
    5、代码规范 无
    6、具体编码:


    namespace 排球计分程序
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }
    int a = 0;
    int b = 0;
    int i = 1;

    private void btnH_Click(object sender, EventArgs e)
    {
    int H = Convert.ToInt32(txtH.Text);
    int L = Convert.ToInt32(txtL.Text);
    H++;
    txtH.Text= H.ToString();

    if (i < 5)
    {
    if (H >= 25 && (H - L) >= 2)
    {
    a++;
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + i + "局:" + a + ":" + b + " ";
    i++;
    }
    }
    else if(i==5)
    {
    if (H >= 15 && (H - L) >= 2)
    {
    a++;
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + i + "局:" + a + ":" + b + " ";
    }
    }
    if (a == 3)
    {
    MessageBox.Show("A队胜利");
    txtH.Text = "0";
    a = 0;
    txtL.Text = "0";
    b = 0;
    txtCount.Clear();
    i = 1;
    }
    }

    private void btnL_Click(object sender, EventArgs e)
    {
    int H = Convert.ToInt32(txtH.Text);
    int L = Convert.ToInt32(txtL.Text);
    L++;
    txtL.Text = L.ToString();

    if (i < 5)
    {
    if (L >= 25 && (L - H) >= 2)
    {
    b++;
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + i + "局:" + a + ":" + b + " ";
    i++;
    }
    }
    else if (i == 5)
    {
    if (L >= 15 && (L - H) >= 2)
    {
    b++;
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + i + "局:" + a + ":" + b + " ";
    }
    }
    if (b == 3)
    {
    MessageBox.Show("B队胜利");
    txtH.Text = "0";
    a = 0;
    txtL.Text = "0";
    b = 0;
    txtCount.Clear();
    i = 1;
    }
    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }
    }
    }


    7、代码复审:30min
    8、测试:无
    9、报告
    测试报告:30min
    计算工作量:15天
    事后总结:
    有的功能还没有实现,数据库连接还是出现问题。

  • 相关阅读:
    基于express框架的Token实现方案
    书籍整理
    openfire4.0.2开发环境搭建(windows)
    Express4.x动态的销毁或者替换中间件(app.unuse)
    mysql学习笔记(三)----函数
    mysql学习笔记(二)----数据类型
    mysql学习笔记(一)----建表操作
    Windows-mysql5.7安装
    JavaScript学习笔记–(new关键字)
    n枚硬币问题(找假币)
  • 原文地址:https://www.cnblogs.com/fujunyi/p/6220089.html
Copyright © 2011-2022 走看看