博文简要信息表
项目 | 内容 |
---|---|
软件工程 | 任课教师博客主页链接 |
结对项目要求 | 作业链接地址 |
课程学习目标 | 熟悉软件开发整体流程,提升自身能力 |
本次作业在哪个具体方面帮助我们实现目标 | 第一次体验一个完整的工程 |
点评信息
||||
|--|--|
|点评博客:|201671010453 钟红耀 实验二个人项目|
|github地址:|github地址|
|点评内容:|从你的博文可以看出来,你对待本课程的重视程度,使用了严格的markdown排版:代码方面规范整齐,内容健壮,唯一的不足就是缺少部分功能。|
|点评心得:|自己对markdown的排版还有很大的欠缺, 基本排版还不是很了解,要多加注意和使用;代码方面对代码开发过程不是很熟悉,导致过程花了大把的时间。|
源码地址
查看源码请点我
结对项目实施过程
a.需求分析 --根据实验四 软件工程结对项目所提要求,我们分析的主要需求有:
a. 可处理任意用户输入的任意英文文本功能;
b. 统计该文本的行数和字符数功能
c. 指定单词词频统计功能;
d. 前k个高频词统计功能;
e. 统计该文本所有单词数量及词频数,并能将单词及词频数按字典顺序输出到文件result.txt功能
f. 统计时计时功能;
g. GUI人机交互界面;
h. 统计文本中除冠词、代词、介词之外的高频词;
b.软件设计:使用类图

类型 | 内容 |
---|---|
数据 | 设计数据库的E-R图 |
工具 | IDEA,Navicat,Git,Github,maven,nginx |
框架 | ssm |
图形 | (Echarts) |
编程技术 | WEB |
c.核心功能代码展示:展示核心功能代码
数据接口层源码
package com.zhong.controller;
import com.zhong.entiry.*;
import com.zhong.service.TestDateService;
import com.zhong.service.WordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/word")
public class WordController {
@Autowired
WordService wordService;
@RequestMapping(value = "/count" )
public @ResponseBody
ResultResponse selectWord()throws CustomException{
List<Word> list=wordService.selectWord();
if(list.size()>=1)
System.out.println("有数据");
ResultResponse rs=new ResultResponse(list,0,"");
return rs;
}
@RequestMapping(value = "/countOther" ,method = RequestMethod.POST)
public @ResponseBody
ResultResponse selectWordOther()throws CustomException{
String str="at,before,after,since,still,until,upon,on,from,between,by,in,during,for,through,
" +
"within,over";
String strArray[]=str.split(",");
List<Word> list=wordService.selectWord();
for (int i = 0; i <list.size() ; i++) {
String word=list.get(i).getWord();
if(word!="the"&&word!="an"&&word!="a"){
boolean flag=true;
for (int j = 0; j <strArray.length ; j++) {
if(word==strArray[j])
flag=false;
}
if(flag==false){
list.remove(i);
}
}
}
if(list.size()>=1)
System.out.println("有数据");
ResultResponse rs=new ResultResponse(list,0,"");
return rs;
}
@RequestMapping("/wordLine")
public @ResponseBody
控制层源码
<!--JavaBean传递参数-->
<select id="selectWord" resultType="com.zhong.entiry.Word">
SELECT * FROM word
</select>
<select id="selectWordLine" resultType="com.zhong.entiry.WordLine">
SELECT * FROM word_count
</select>
<select id="selectTimeCount" resultType="com.zhong.entiry.TimeCount">
SELECT * FROM time_count
</select>
<insert id="insertword" parameterType="java.util.List" useGeneratedKeys="false">
insert into word
(word,count)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.word},
#{item.count}
)
</foreach>
</insert>
<insert id="insertWordLine" parameterType="com.zhong.entiry.WordLine">
insert into word_count
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wordLine != null">
wordLine,
</if>
<if test="charCount != null">
charCount,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wordLine != null">
#{wordLine,jdbcType=INTEGER},
</if>
<if test="charCount != null">
#{charCount,jdbcType=INTEGER},
</if>
</trim>
</insert>
<insert id="insertTimeCount" parameterType="java.util.List" useGeneratedKeys="false">
insert into time_count
(type,time)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.type},
#{item.time}
)
</foreach>
</insert>


####f. 提供此次结对作业的PSP。 ###结对作业的PSP
PSP2.1 | 任务内容 | 计划共完成需要的时间(min) | 实际完成需要的时间(min) |
---|---|---|---|
Planning | 计划 | 25 | 20 |
Estimate | 估计这个任务需要多少时间,并规划大致工作步骤 | 25 | 20 |
Development | 开发 | 500 | 420 |
Analysis | 需求分析 (包括学习新技术) | 100 | 80 |
Design Spec | 生成设计文档 | 30 | 30 |
Design Review | 设计复审(和同事审核设计文档) | 15 | 11 |
Coding Standard | 代码规范(为目前的开发制定合适的规范) | 20 | 20 |
Design | 具体设计 | 60 | 50 |
Coding | 具体编码 | 450 | 400 |
Code Review | 代码复审 | 60 | 80 |
Test测试 | (自我测试,修改代码,提交修改) | 50 | 40 |
Reporting | 报告 | 50 | 50 |
Test Report | 测试报告 | 20 | 20 |
Size Measurement | 计算工作量 | 10 | 5 |
Process Improvement Plan | 事后总结,并提出过程改进计划 | 25 | 30 |
g.对此次实验的总结
此次实验是结对项目,两个人互相学习,互相进步。在此次实验中向我的搭档钟红耀学习到了很多东西,让我深刻的认识到了自己的不足。