Comment Overview
The use of comment content was very well used, making parts of the code easier to understand. Also using end closing brace comments when they had a complex nested control structure, which made it unproblematic to follow.
Javadocs
Their javadocs gave a good complete description of the program. It gave good details to understand what each method's function is in the game and also what the parameters are that’s being passed in.
Logic and Structure
The method logic was good throughout the code, but the attack() method could have been named better to show how the function is described in the javadoc. Since the attack() method was to tell the knights to move aggressively, and also they had another method which was to tell the knights to attack.
The class structure was well designed, most of the main function of the knights, peasants, and castle was organized well. They first split the knights into the 2 groups then having them move to a specific manner, then calling the oderPeasants() method for the peasant movement, and lastly controlling how much knights or peasants to produce.
Coding Format
File Lines Violation Comment MyRuler.java 9, 86, 87, * ICS-SE0Eclipse-2 more than 100 characters in a line MyRuler.java 231 EJS p.24 Method naming convention
Conclusion
The goal of this assignment was to review another person’s code, based on the Java coding and documentation standards. After examining West and Shum’s code, I see that they followed the standards pretty well. Doing this, they made it uncomplicated to understand what each portion of their code was performing. Following these standard is very useful and would make open source programming easier for all programmers.
No comments:
Post a Comment