202103226-1 编程作业

这个作业属于哪个课程 https://edu.cnblogs.com/campus/zswxy/computer-science-class4-2018
这个作业要求在哪里 https://edu.cnblogs.com/campus/zswxy/computer-science-class4-2018/homework/11880
这个作业的目标 编程作业
其他参考文献 《构建之法》
                                                           |

一、Github项目地址
https://gitee.com/a1399076298/project-java/tree/master/20188516
二. 解题思路
1.1. 需求分析
统计文件的字符数(对应输出第一行)
统计文件的单词总数(对应输出第二行)
统计文件的有效行数(对应输出第三行)
统计文件中各单词的出现次数(对应输出接下来10行)
输出结果
三.代码规范
https://gitee.com/a1399076298/project-java/tree/master/20188516
四.接口的设计与实现过程
接口设计
page1类:
main()函数调用三个构造方法

int length = item.length;// 得到item的长度

		FileInputStream fis = null;

		try {
			fis = new FileInputStream(file_path);

			while ((bytes = fis.read(item, 0, length)) != -1) {
				countChar += bytes;
			}

三个构造方法函数

public static int getLineNum(String fileName) throws IOException{}
public static int getCharNum(String fileName) throws IOException{}
public static int getWordNum(String fileName) throws IOException {}

五、性能改进
具体怎么改进自己目前还不是很清楚
六.单元测试



七、异常处理说明
路径异常
八.psp表

PSP2.1 Personal Software Process Stages 预估耗时(小时) 实际耗时(小时)
Planning 计划 0.5 0.5
• Estimate • 估计这个任务需要多少时间 120 96
Development 开发 10 11
• Analysis • 需求分析 (包括学习新技术) 6 4
• Design Spec • 生成设计文档 0.5 0.5
• Design Review • 设计复审 0.5 0.5
• Coding Standard • 代码规范 (为目前的开发制定合适的规范) 10min 10min
• Design • 具体设计 2 1.5
• Coding • 具体编码 3 3.5
• Code Review • 代码复审 20min 20min
• Test • 测试(自我测试,修改代码,提交修改) 1 1
Reporting 报告 3 3.5
• Test Repor • 测试报告 0.5 0.5
• Size Measurement • 计算工作量 0.5 0.5
• Postmortem & Process Improvement Plan • 事后总结, 并提出过程改进计划 1 1.5
合计

posted on 2021-04-09 20:54  佳佳佳333  阅读(38)  评论(0编辑  收藏  举报