Comments on Lab2 Stubs

 

1. This is a sample heading if it has to be returned by startGame

 

            Sammy     Michael      Winner
     
2.If StartGame is allowed to print then the following might is a better heading and then the return type would be void.
            
            Sammy     Michael      Winner
     -------------------------------------------------
 
 
3.If the following is your comment in startGame, then startGame would need parameters and the description doesn’t indicate this.  //Get the names of the players from other methods and the winner

4.  As described  runRound needs to call generateNumber  and determineWinner, update the players’ scores, AND return a String to playGame to be output.    Yours doesn’t
 
5.  As described, all startGame is to do is to print the heading two lines and call playGame.
 
6.  An empty string is NOT an appropriate return value for a stub.
 
7.  The constructor has to set the class attributes somehow.  How is it to get its values if not through the parameter list?
 
8.  As described, getFinalResult needs to return the String with the final results to Main.
 
9.  As described, playGame calls runRound and prints the information returned to it by runRound.
 
10.  getFinalResult does NOT call the playGame method.
 
11. number2 is NOT a good name for a variable holding a String.
 
12. Some of the comments in this method are in the wrong method.
 
13. One or more of the comments in this method doesn’t make sense
 
14. This method has the wrong number of parameters
 
15. This method should not have a parameter value (or at least not the
    One you’ve described.
 
16. You need two player names and two scores as attributes.
 
17. Constructors don’t have return types
 
18. The comments describing your methods which will appear as javadocs are too vague.