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这部分的内容貌似应该由作者进行展示,但是因为没有作为作业提交的项目,所以也就无从谈起了吧。

 

posted on 2015-09-29 09:32  xixibaba  阅读(180)  评论(1编辑  收藏  举报