CS 1713 Introduction to Computer Science:
Comments on Project 1
This project was graded out of 20 points.
- The toString method of GroceryProductList
should not output any items that are null.
If the list
has only 2 items in it, only 2 items should be shown.
- Stings should always be compared using .equals, not ==.
- Your tester should test the return value of addGroceryProduct
so you can check if it is correct.
- You need to test the methods of GroceryListTester when the list
is not full.
Most people did not do this.
In many cases these tests would have shown serious
errors in your code.
- You should be able to read the output generated by the test program
and tell what each of the things mean.
Do not just output a number or the word true without an
explanation.
- Your source code should be nicely formatted without long lines and with
proper indentation.
Use Source -> Format in eclipse.
Below is some sample code:
GroceryProduct.java
GroceryProductList.java
GroceryListTester.java
output