1. 程式人生 > >20165302 敏捷開發與XP實踐作業

20165302 敏捷開發與XP實踐作業

AR .html int 技術分享 cnblogs 作業 string image junit

20165302 敏捷開發與XP實踐實驗報告

一.提交點一

1.實驗要求

  • 參考 http://www.cnblogs.com/rocedu/p/6371315.html#SECCODESTANDARD 安裝alibaba 插件,解決代碼中的規範問題。

  • 在IDEA中使用工具(Code->Reformate Code)把下面代碼重新格式化,再研究一下Code菜單,找出一項讓自己感覺最好用的功能。提交截圖,加上自己學號水印。

    public class CodeStandard {
    public static void main(String [] args){
    StringBuffer buffer = new StringBuffer();
    buffer.append(‘S‘);
    buffer.append("tringBuffer");
    System.out.println(buffer.charAt(1));
    System.out.println(buffer.capacity());
    System.out.println(buffer.indexOf("tring"));
    System.out.println("buffer = " + buffer.toString());
    if(buffer.capacity()<20)
    buffer.append("1234567");
    for(int i=0; i<buffer.length();i++)
    System.out.println(buffer.charAt(i));
    }
    }

    2.格式化後

    public class CodeStandard {
    public static void main(String [] args){
        StringBuffer buffer = new StringBuffer();
        buffer.append(‘S‘);
        buffer.append("tringBuffer");
        System.out.println(buffer.charAt(1));
        System.out.println(buffer.capacity());
        System.out.println(buffer.indexOf("tring"));
        System.out.println("buffer = " + buffer.toString());
        if(buffer.capacity()<20) {
            buffer.append("1234567");
        }
        for(int i=0; i<buffer.length();i++) {
            System.out.println(buffer.charAt(i));
        }
    }
    }

3.截圖

  • 修改前

技術分享圖片

  • 修改後

技術分享圖片

4.Code菜單的使用

二.提交點二

1.實驗要求

  • 在碼雲上把自己的學習搭檔加入自己的項目中,確認搭檔的項目加入自己後,下載搭檔實驗二的Complex代碼,加入不少於三個JUnit單元測試用例,測試成功後git add .; git commit -m "自己學號 添加內容";git push;
  • 提交搭檔項目git log的截圖,包含上面git commit的信息,並加上自己的學號水印信息。

2.測試成功截圖

3.上傳到搭檔碼雲,git log日誌

技術分享圖片

三,提交點三

1.實驗要求

  • 敏捷開發與XP實踐 http://www.cnblogs.com/rocedu/p/4795776.html, Eclipse的內容替換成IDEA
  • 完成重構內容的練習,下載搭檔的代碼,至少進行三項重構,提交重構後代碼的截圖,加上自己的學號水印。提交搭檔的碼雲項目鏈接。

2.關於重構

技術分享圖片

20165302 敏捷開發與XP實踐作業