Archibald Haddock (123456789) COMP-202A, Section 0 (Fall 2010) Instructor: Cuthbert Calculus Assignment 1, Question 3 (a) 1. Line: 14 Problem: Variable names x, y, z, and q do not represent the nature of the values stored in the corresponding variables. Fix: Change variable names as follows: * x -> ageIn1989 * y -> birthMonth * z -> birthDay * q -> average 3. Line: 24 Problem: Comments should not be placed to the right of the line to which they pertain, as it makes the program hard to read on narrow displays. Fix: Place the comment // compute the average of inputs on the line immediately preceding q = (x + y + z / 3); 3. Line: 27 Problem: Variable meaninglessexpression does not follow case conventions for variables and is therefore hard to read. Fix: Change the name of variable meaninglessexpression so that it becomes meaninglessExpression. 4. Line: 27 Problem: Variable is declared in the middle of the program. Fix: Variables that are local to a method should be declared at the beginning of this method, to make it easier for people reading the source code to find the declaration for a particular variable. Separate the line: int meaninglessexpression = (((q*12-(4(z/x)+100)*y-z)%5)/2+283); into two lines: int meaninglessexpression; meaninglessexpression = (((q*12-(4(z/x)+100)*y-z)%5)/2+283); Move the first line with the other variable declarations, and leave the second line where the original line was. 5. Line: 29 Problem: The value of the meaningless expression is displayed without any explanatory message. Fix: Display an explanatory message along with the value of the meaningless expression: System.out.println("The meaningless expression " + "evaluates to: " + meaninglessexpression);