標籤:
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---結對程式設計對象代碼複查