Cheating AUTOMATIC ZERO ALL PARTIES Hopeless program -90 No test program -20 No disk -15 Envelope - 5 No name in code -10 Data not private -10 Methods not public - 5 Duplicate fields -10 month/day/year static -15 Lousy indenting -10 Long lines cause bad printouts - 2 Capitalized variables or lower case classes - 2 Ridiculous variable names - 5 Unnecessary variable shadowing - 5 if( cond ) return true else return false - 3 if(expr==true) instead of if(expr) - 2 ab instead of a!=b - 2 == instead of String.equals - 5 Extra ; after if statement -10 sloppy logic; no early exits or missing else - 3 Confusing logic; extra local vars - 3 Absurd, incomprehensible code -10 Nonsensical extends clause - 3 Gratutious new - 2 Code replication - 5 Gratuitous import directives - 3 Excessive output - 3 Several field declarations listed on one line - 0 Leading 0s in constants - 3 Absurd magic #s such as 372 - 5 do/while instead of while - 3 Unneeded setting of variable to force break - 3 Poor implementation of Date() - 5 void Date() bug -10 Date() does nothing - 5 Missing two constructors -10 no error checks in mutators/constructors -10 No error check in setDate only - 5 Object left in bad state - 3 month=this.month in constructor - 5 Off-by-one allows 32 days in month - 3 Off-by-one allows 0th date of month - 3 Using 31 instead of daysInMonth - 5 Using System.exit - 2 static methods in Date class -10 dateAfter made static - 5 tostring or ToString instead of toString - 5 Wrong signature for toString -10 bugs in compareTo -15 compareTo uses fancy calculations that fail - 5 returns negative of correct answer - 5 Instantiating MonthInfo - 2 wrong signature for future/dateAfter -10 missing test for futureDate - 3 Code does not use isLeapYear; rewrites it - 5 bugs in dateAfter -15 bugs in futureDate -15 futureDate excessively complex - 5 Complicated impl of getMonth in MonthInfo - 5 Off-by-one bug in getMonth - 5 Using 31 instead of daysInMonth - 5 no error checks in getMonth - 5 Attempt to error check, but no error signal - 2 Silly while loop in getMonth(int) - 3