CS 367, Summer 2014 Programming Assignment 1
Name
Student, Annie
Score
100
(out of
100
)
Grader
Name of TA
(
TA's CS login/email
)
General Comments
General grading standards for programming assignment 1.
45
InteractiveDBTester class (45 points)
Output format not as specified (-4)
Comments:
Minor output format problems (e.g., a few extra commas or extra spaces) (-1)
Comments:
Iterators not used where appropriate (-4)
Comments:
Comparing product id codes and customer usernames (-2)
Always case-sensitive (-2)
Comments:
Step 1: check command-line args (-2)
Comments:
Step 2: check input file (-2)
Comments:
Step 3: load input file (-3)
Comments:
Command option 'd' (-2)
Comments:
Command option 'f' (-3)
Comments:
Command option 'i' (-22)
Step 1: # customers, # products (-5)
Comments:
Step 2: # products/customer: most, least, average (-6)
Comments:
Step 3: # customers/product: most, least, average (-6)
Comments:
Step 4: most popular product (-5)
Comments:
Command option 's' (-3)
Comments:
Command option 'r' (-2)
Comments:
37
CustomerDatabase class (37 points)
Iterators not used inside CustomerDatabase class where appropriate (-2)
Comments:
Handling null parameter values (-3)
Comments:
Didn't handle bad param values by throwing an exception (-3)
Comments:
Threw wrong exception when given bad param values; should throw IllegalArgumentException (-1)
Comments:
Comparing customers / products done using == instead of .equals() (-2)
Comments:
Constructor missing/incorrect (-1)
Comments:
addCustomer(c) (-2)
Comments:
addProduct(c, p) (-4)
Comments:
containsCustomer(c) (-2)
Comments:
containsProduct(p) (-3)
Comments:
getCustomers(p) (-3)
Comments:
getProducts(c) (-2)
Comments:
hasProduct(c, p) (-3)
Comments:
iterator() (-1)
Comments:
removeCustomer(c) (-3)
Comments:
removeProduct(p) (-4)
Comments:
size() missing/incorrect (-1)
Comments:
8
Program design (8 points)
Customer class modified (-2)
Comments:
Additional public methods/constructors added to CustomerDatabase (-2)
Comments:
CustomerDatabase should manage data structure only (like ArrayList) (-2)
Comments:
InteractiveDBTester has code that should be done by CustomerDatabase (-2)
Comments:
InteractiveDBTester should do file input (not CustomerDatabase) (-2)
Comments:
InteractiveDBTester should do console output (not CustomerDatabase) (-2)
Comments:
InteractiveDBTester should do the code specific to the application (not CustomerDatabase) (-2)
Comments:
Excessive/unnecessary additional classes (-1)
Comments:
All data members should be
private
for this assignment and should not be accessed directly outside the class they were declared in (-2)
Comments:
InteractiveDBTester should contain methods to do repeated tasks / break the code into chunks for readability (-2)
Comments:
10
Style and Documentation (10 points)
File name not the same as the class name (-1 per file) (-3)
Comments:
File name is incorrect (-1 per file) (-3)
Comments:
Bad Style: line up braces (-1)
Comments:
Bad Style: use vertical whitespace (-1)
Comments:
Bad Style: use horizontal whitespace (-1)
Comments:
Bad Style: indent to show level of nesting (-1)
Comments:
Bad Style: lines must not exceed 80 columns (-1)
Comments:
Bad Style: follow naming conventions (-1)
Comments:
Bad Style: use descriptive names (-1)
Comments:
Bad Commenting: each file requires a header comment (-1)
Comments:
Bad Commenting: each class/method requires javadoc-style comments (-1)
Comments:
Bad Commenting: use comments in method bodies (-1)
Comments: