• 软工网络15结对编程练习 201521123056 吴剑通


    0、结对编程成员:

    吴剑通博客地址:https://www.cnblogs.com/wjt960310/
    杨钧宇博客地址:http://www.cnblogs.com/GOB8023/
    码云地址:https://gitee.com/jmu201521123056/four_operations
    源代码:https://coding.net/u/Belong033/p/java-third/git
    原题目要求
    http://www.cnblogs.com/happyzm/p/6472120.html
    http://www.cnblogs.com/happyzm/p/6509116.html
    http://www.cnblogs.com/happyzm/p/6558307.html
    1.改进现有代码

    浏览所有代码考虑代码质量和测试覆盖率

    2、博客要求:
    提交的博客(两个同学都要写)必须完整包含下面内容:

    • 需求分析:
      1)计时器:显示用户完成全部答题的所用时间。
      2)计算正确个数:显示用户所答对题目的个数
      3)式子个数:用户总共答题个数
      4) 语言选择功能:更换显示的语言。
      程序设计:

    • 代码展示:
      1)、计时器:

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
    over=System.currentTimeMillis();
    now1=((over-now) / (1000 * 60 * 60) % 60)+":"+((over-now)/ (1000 * 60)% 60)+":"+((over-now)/ 1000 % 60);
    String a=now1+"";
    jTextField7.setText(a);
    // TODO add your handling code here:
    }
    

    2)、语言选择

     private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {                                           
     jLabel1.setText("arithmetic"); 
     jLabel2.setText("Please input number :");
     jButton1.setText("Start");
     jLabel3.setText("The topic purpose :");
     jButton2.setText("answer");
     jLabel5.setText("Your answer:");
     jLabel10.setText("correct answer:");
     jButton4.setText("Next question");
     jLabel9.setText("The time used for:");
     jLabel7.setText("Wrongc number :   ");
     jLabel6.setText("All number :      ");
     jLabel8.setText("correct :         ");
     jButton3.setText("End of the answer");// TODO add your handling code here:
    }                                          
    private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) {                                       
        // TODO add your handling code here:
    }                                      
    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {                                           
     jLabel1.setText("四则运算"); 
     jLabel2.setText("请输入题数:");
     jButton1.setText("开始做题");
     jLabel3.setText("题 目:");
     jButton2.setText("查看答案");
     jLabel5.setText("你的答案:     ");
     jLabel10.setText("正确答案:");
     jButton4.setText("下一题");
     jLabel9.setText("所用时间为:");
     jLabel7.setText("错  题  数:");
     jLabel6.setText("答  题  数:");
     jLabel8.setText("正  确  率:");
     jButton3.setText("结束答题");
     // TODO add your handling code here:
    }                                          
    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
     jLabel1.setText("四則運算"); 
     jLabel2.setText("請輸入題數:");
     jButton1.setText("開始做題");
     jLabel3.setText("題      目:");
     jButton2.setText("查看答案");
     jLabel5.setText(" 你的答案是:");
     jLabel10.setText("正確答案是:");
     jButton4.setText("下一題");
     jLabel9.setText("所用時間為 :");
     jLabel7.setText("錯  題  數:");
     jLabel6.setText("答  題  數:");
     jLabel8.setText("正  確  率:");
     jButton3.setText("结束答題");
    

    程序运行:程序运行及每个功能的使用截图。

    PSP2.1 个人开发流程 预估耗费时间(分钟) 实际耗费时间(分钟)
    Planning 计划 10 6
    Estimate 明确需求和其他相关因素,估计每个阶段的时间成本 8 6
    Development 开发 120 180
    Analysis 需求分析 (包括学习新技术) 15 20
    Design Spec 生成设计文档 15 10
    Design Review 设计复审 5 8
    Coding Standard 代码规范 10 15
    Design 具体设计 15 10
    Coding 具体编码 40 60
    Code Review 代码复审 10 8
    Test 测试(自我测试,修改代码,提交修改) 20 30
    Reporting 报告 15 30
    . 测试报告 5 5
    . 计算工作量 6 5
    . 并提出过程改进计划 10 2

    码云上传记录:

    讨论、细化和编程时的结对照片

    小结感受:

    对于Java编程原本就不熟悉,虽然在大二学过这个课程,但是对于编程语言还是一定程度上忘记了。所以这次的结对编程的过程中,重新温习一遍Java编程语言也成了一个不可或缺的步骤,这也造成了在写的过程中写起来非常蹩脚。
    
    计算正确个数、式子个数两部分的代码比较简单没有给出。这里将一下这两个的伪代码,式子个数在随机产生的过程中可以记录下总的式子数目。在计算正确个数时,设置一个变量为flag的常数变量,在判断式子正确的过程中,当答案正确时,flag加一
    
    计算正确个数,以及式子总数、计时器在后期写入分析模块时,统计当前以及写过的式子总数,还有正确率以及做题所用的时间,通过显示这些参数能够为家长分析孩子是否在偷懒、孩子的学习情况、学习的薄弱部分等等
    
    当前的程序还有很大的改进空间
    
  • 相关阅读:
    用c#开发微信 (7) 微渠道
    Swift语言精要
    Android开发点滴
    UITableViewAutomaticDimension
    iOS中ActionSheet和Alert的区别
    本博客申明
    iOS中重用UITableView单元格时,千万别忘了这个
    Swift 2 语言精要
    Objective-C中NSString与int和float的相互转换
    Android Studio常用快捷键
  • 原文地址:https://www.cnblogs.com/wjt960310/p/8646399.html
Copyright © 2020-2023  润新知