201671010453鍾紅耀英文文本統計分析》結對項目報告

GitHub:https://github.com/zhonghongyao/ssm.githtml

博文簡要信息表

項目 內容
軟件工程 任課教師博客主頁連接
結對項目要求 做業連接地址
課程學習目標 熟悉軟件開發總體流程,提高自身能力
本次做業在哪一個具體方面幫助咱們實現目標 第一次體驗一個完整的工程

任務一:

點評信息

點評博客: 201671010444 夏嚮明 實驗二我的項目
GitHub: https://github.com/xiaxiangming/-
點評內容: 項目設計上條例分析清楚,但實現上和大多數同窗同樣,代碼太過於標準,但願能有本身的代碼風格和實現思路
點評心得: 但願助教能夠在技術方面對咱們提出建設性的意見

任務二:

1.需求分析

1.統計單詞詞頻柱形圖
2.統計該文本行數和字符數
3.各類統計統計功能,顯示程序所消耗時間
4.可處理任意用戶導入的任意文本
5.統計文本中除冠詞,代詞,介詞以外的高頻詞
java

2. 軟件設計-使用類圖

類型 內容
數據 設計數據庫的E-R圖
工具 IDEA,Navicat,Git,Github,maven,nginx
框架 ssm
圖形 Echarts
編程技術 WEB
開發手冊 阿里巴巴開發手冊

圖片名稱

3.展現核心功能代碼



數據層接口層:

<!--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>


控制層:nginx

@Controller
@RequestMapping("/word")
public class WordController {git

@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,\n" +
            "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
ResultResponse selectWordLine(){
    List<WordLine> list=wordService.selectWordLine();
    if(list.size()>=1)
        System.out.println("有數據");
    ResultResponse rs=new ResultResponse(list,0,"");
    return  rs;
}


@RequestMapping("/timeCount")
public @ResponseBody
ResultResponse selectTimeCount(){
    List<TimeCount> list=wordService.selectTimeCount();
    if(list.size()>=1)
        System.out.println("有數據");
    ResultResponse rs=new ResultResponse(list,0,"");
    return  rs;
}

}github

4.功能界面截圖

圖片名稱



圖片名稱

5. 描述結對的過程,提供兩人在討論、細化和編程時的結對照片


照片
圖片名稱

感想 總結
技術 主要是採用RestFul APi,採用這個技術的緣由是先後臺分離,有利於模塊的鬆耦合,和開發公司技術比較接近
交流 對一個功能,兩我的會有不同的想法和思路,這個時候就使用代碼的複雜度來度量和代碼的整潔度,體現了代祖華老師說的軟件工程的有效性,不必定追求完美
學習 經過和他人對比發現了本身的不足和長處,但願在下一次多人的配合中發揮技術骨幹的力量

6.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

總結:
1.本身對於業務代碼的熟悉度增長,echarts語法使用更加熟練
2.對jdk1.8中Lambda表達式更加熟悉
3.git提交出現錯誤:
解決方法git remote set-url origin url
合併代碼:git pull --rebase origin master
提交代碼:git push -u origin master
圖片名稱
sql

相關文章
相關標籤/搜索