201671010439溫永琴 實驗四 《英文文本統計分析》結對項目報告

任務一1:github地址:http://www.javashuo.com/article/p-diaznfmk-kn.htmlhtml

閱讀結對方博客,博客內容結構清晰,代碼寫的很是不錯,按照老師的要求進行。但須要在完善一下代碼,充實博客內容。須要更加詳細的數據證明代碼運行的完整性和可行性。還有就是博文能夠在寫的規整和詳細。代碼有點錯誤再更正一下。git

2.克隆對方項目,閱讀並測試運行代碼,結合運行結果評論程序代碼 。連接地址:https://github.com/jinshengfang123/jieduigithub

 2:結對方項目:編程

StringTokenizer st = new StringTokenizer(file," ,.!?\"'"); //用於切分字符串學習

TreeMap hm = new TreeMap<>();
while(st.hasMoreTokens()) {
String word = st.nextToken();
if(hm.get(word) != null) {
int value = ((Integer)hm.get(word)).intValue();
value++;
hm.put(word, new Integer(value));
}
else {hm.put(word, new Integer(1));測試

}
}

TreeMap tm = new TreeMap(hm);
ui

ByValueComparator bvc = new ByValueComparator(tm);
List<String> ll = new ArrayList<String>(tm.keySet());
Collections.sort(ll, bvc);
for(String str:ll){
System.out.println(str+"——"+tm.get(str));
}
}
}編碼

運行結果:設計

任務二:代碼規範

主要代碼:

ublic class tongjidancishumu{
 private static Map<String, Integer> words = new HashMap<String,Integer>();
 public static void main(String[] args) throws IOException {
  // TODO Auto-generated method stub
 String src = "E:/Word.txt";
 String wenzhang=ReadSrc(src);
 words = Count(wenzhang);
 Iterator<String> it = words.keySet().iterator();
 while(it.hasNext()){
  Object key = it.next();
  System.out.println(key);
  System.out.println(words.get(key));
 }
 
 }

運行結果: 

 3.這次任務是由我和個人結對博友一塊兒通過協做討論共同完成。咱們兩人一塊兒查閱資料,而且獲得同窗的幫助下完成。以下圖是我和結對成員一塊兒討論、細化和 編程的圖片:

 

 

任務三: 

 博文簡要信息表

 PSP2.1 任務內容  計劃共完成須要的時間(min)  實際完成須要的時間(min)
 Planning  計劃

30

 26
 Estimate    估計這個任務須要多少時間,並規劃大體工做步驟  20  20
 Development  開發  100  100
   Analysis  需求分析 (包括學習新技術)  23  30
   Design Spec  ·  生成設計文檔  20  10
  Design Review  ·  設計複審 (和同事審覈設計文檔)  50  60
   Coding Standard  代碼規範 (爲目前的開發制定合適的規範)  40  45
 Design  具體設計  35  40
     Coding  具體編碼  60  77
   Code Review  代碼複審  20  25
     Test  測試(自我測試,修改代碼,提交修改)  10  10
 Reporting  報告 10  10
 Test Report  測試報告  10  20
     Size Measurement    計算工做量  200  250
 Postmortem & Process Improvement Plan  過後總結 ,並提出過程改進計劃  20  20
相關文章
相關標籤/搜索