zoukankan      html  css  js  c++  java
  • 结对编程练习

    团队成员

    邱伟达:201521123020
    陈龙:201521123027

    代码设计过程

    • 流程图

    • 运行截图

    • 核心代码
    计时器代码
    private boolean isRun = false;
         private MyRunable myTimeRunable = new MyRunable();
         private class MyRunable implements Runnable{
                private int hour = 0;
                private int min = 0;
                private int sec = 0;
                private NumberFormat format = NumberFormat.getInstance();
                private String nextSecond(){
                    ++sec;
                    if(sec == 60) {
                        ++min;
                        sec = 0;
                    }
                     
                    if(min == 60) {
                        ++hour;
                        min = 0;
                    }
                    return currentTime();
                }
                 
                private String currentTime(){
                    return format.format(hour)+":"+format.format(min)+":"+format.format(sec);
                }
                 
                @Override
                public void run() {
                    format.setMinimumIntegerDigits(2);
                    format.setGroupingUsed(false);
                    while(true) {
                        if(rootPaneCheckingEnabled) {
                            if(isRun) {
                                nextSecond();
                                jLabel4.setText(currentTime());
                            }
                        }
                        try {
                            Thread.sleep(1000);
                        }catch (InterruptedException e) {
                        }
                    }
                }
                 
            }
    

    结对过程

    • 码云提交

    • 结对编程照片

    • 测评

    小结

    虽然只是做出了个功能不算很强的四则运算,但还是感受到了开发员的辛苦,不断地修改代码调试程序,而且在实现某些功能想法时总是碰壁,有些想法不得不放弃,能力实在有限。还是感谢这次结对编程能让我们有一次锻炼实践的机会!

  • 相关阅读:
    hdu 4525(数学)
    hdu 4524(模拟)
    hdu 4523(大整数)
    hdu 4517(递推枚举统计)
    hdu 4520
    hdu 4519(数学题)
    hdu 4514(树的直径+并查集)
    hdu 4510(模拟)
    hdu 2089(数位DP)
    hdu 4506(数学,循环节+快速幂)
  • 原文地址:https://www.cnblogs.com/br0823/p/8645111.html
Copyright © 2011-2022 走看看