项目 | 内容 |
这个做业属于哪一个课程 | 软件工程 |
这个做业的要求在哪里 | 实验四 软件工程结对项目 |
我在这个课程的目标是? | 熟悉软件开发总体流程,提高自身能力 |
本次做业在哪一个具体方面帮助咱们实现目标 | 第一次体验一个完整的工程 |
//高频词的统计 整数k public ArrayList gaopin(TreeMap<String,Integer> tm,int k){ ArrayList<Map.Entry<String,Integer>> list = new ArrayList<Map.Entry<String,Integer>>(tm.entrySet()); Collections.sort(list,new Comparator<Map.Entry<String,Integer>>(){ public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) { return o2.getValue() - o1.getValue(); } }); //输出前k个数 for(int i = 0; i<k; i++){ System.out.println(list.get(i).getKey()+ ": " +list.get(i).getValue()); } return list; } //统计文本行数与字符 public List statistics(String fileName) throws IOException{ String line = fileName; System.out.println(fileName); File file = new File(line); InputStreamReader isr = new InputStreamReader(new FileInputStream(file), "utf-8"); BufferedReader br = new BufferedReader(isr); int charNum= 0 ;//字符数 int wordsNum= 0;//数字数 int lineNum = 0;//行数 //以流的形式读入文件 while( br.read()!= -1){ String s = br.readLine(); charNum+=s.length(); wordsNum +=s.split(" ").length; lineNum ++; } isr.close();//关闭 List list=new ArrayList(); list.add(charNum); list.add(wordsNum); list.add(lineNum); // System.out.println("字符数:"+charNum+"\n单词数:"+wordsNum+"\n行数:"+lineNum); return list; }}
1.JSP主页面
2.浏览文件
3.统计完成
4.柱状图显示
5.relust.txt中存放显示
PSP2.1 | 任务内容 | 计划共完成须要的时间(min) | 实际完成须要的时间(min) |
Planning | 计划 | 15 | 18 |
Estimate | 估计这个任务须要多少时间 | 20 | 20 |
Development | 开发 | 200 | 250 |
Analysis | 需求分析(包括学习新技术) | 10 | 10 |
Design Spec | 生成设计文档 | 30 | 25 |
Design Review | 设计复审(和同事审核设计文档) | 8 | 10 |
Coding Standard | 代码规范(为目前的开发制定合适的规范) | 15 | 20 |
Design | 具体设计 | 20 | 15 |
Coding | 具体编码 | 180 | 200 |
Code Review | 代码复审 | 20 | 15 |
Test | 测试(自我测试,修改代码,提交修改) | 10 | 15 |
Reporting | 报告 | 30 | 25 |
Test Report | 测试报告 | 30 | 25 |
Size Measurement | 计算工做量 | 5 | 3 |
Postmortem & Process Improvement Plan | 过后总结,并提出过程改进计划 | 10 | 8 |