個人作業2---結對程式設計對象代碼複查

來源:互聯網
上載者:User

標籤:

General

1.Does the code work? Does it perform its intended function, the logic is correct etc.

直觀地從結果上看,啟動並執行結果還是不錯的,如果按照作業要求中所提示的輸入格式設定參數,輸出基本上符合預期。而且感覺比我的程式要好。

 

2.Is all the code easily understood?

整體的思路和我的程式差不多,也是產生,轉尾碼再計算,所以挺好懂得。

 

3.Does it conform to your agreed coding conventions? These will usually cover location of braces, variable and function names, line length, 

不太符合,感覺風格不太好。二元運算子之間最好都能空一格看著清楚點,然後命名也不太好,不太能具有一定的含義。

 

4.Is there any redundant or duplicate code?

感覺Main函數中產生運算式的分支太多了,有的可以適當合并在內部分支。

 

5.Is the code as modular as possible?

基本上符合模組化編程的要求,但是感覺產生的部分放到Main函數裡不如獨立出來。

 

 

Security

1.Are all data inputs checked (for the correct type, length, format, and range) and encoded?

這一點沒有做到,不過老師在作業要求中似乎也提到這次並不涉及對輸入合法性的檢測。

 

2.Are output values checked and encoded?

Check過,沒有encode...

 

3.Are invalid parameter values handled?

沒有,同1

 

Documentation

1.Do comments exist and describe the intent of the code?

完全沒有注釋!

 

2.Are all functions commented?

完全沒有注釋!

 

因為沒有要求寫文檔,後面的幾項也就都沒有了。

 

 

 

Testing

1這部分的內容貌似應該由作者進行展示,但是因為沒有作為作業提交的項目,所以也就無從談起了吧。

 

個人作業2---結對程式設計對象代碼複查

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.