Name:  Elizabeth Adams

Assignment:  Lab 1 – changes made to code with reasons

Date:  January 17, 2005

Course:  CS 239

 

Blue items are Adams rules

Red items a strongly suggested guidelines – except where truly imappropriate

 

  1. Removed the BREAK statement (Design B.2)
  2. changed the method names to use lowercase except for the first letter of each word other than the first word (Style B.3)
  3. Fixed indentation (Style C.1, C.2, C.3)
  4. Variables should be declared at the top of a method – START isn’t
  5. Shouldn’t declare and initialize in the same statement -  BufferedReader stdin
  6. START isn’t a constant so it should be in lower case (Style B.3)
  7. Should give user range of numbers that are valid first (Style E.4)

7a.  Should provide user with range of numbers.

  1. Moved the methods that printed the verse to another class because shouldn’t have other methods in same class as main (Design C.1)
  2. It would be nice to tell the user what the program will do (i.e. provide an intro)
  3. Verse should not be capitalized.  It is a variable not a class (Style B.2)
  4. Added header documentation (Documentation C.2)
  5. Added comments (Documentation D.1, D.2)
  6. changed variable name START to numberOfBottles (Style A.1, A.2, B.3)
  7. The input to your program should be echoed back to the user
  8.  Spelling and grammar count
  9. Every class and method needs a javadocs comment which includes a description, the parameters (if any) and the return information (if any)
  10. Lines of code should be short enough so that wrap-around doesn’t occur on printout
  11. We will not use the Keyboard class this semester
  12. Don’t use the tab key for indentation – use the space bar
  13. You should have used if (  )  else if (   )  else if (  ) in this assignment and the order of the test conditions matters    
  14. Don’t put too much code in main method
  15. This could cause a logic problem when your program runs
  16. Header comments need to be in javadocs format
  17. I prefer that your methods return a single value or variable – don’t have a computation in the return statement.   Don’t initialize variables that don’t need to be initialized.
  18. Curly braces need to be on lines by themselves and need to have matched indentation.