tinsweep/have-no-bananas — pull request #5 by niffer01 (2014-06-23 04:22:11+00:00)
Title: Coded FoodItem, ListItem, and ShoppingList.

I refined ListOfItems interface. I also created the abstract class Item to use as a basis for FoodItem and ListItem. I created ShoppingList which implements ListOfItems. Included are all of my test classes.

I used the builder method instead of a constructor for ListItem because ListItem can be instantiated with a varying number of parameters. The only required parameter is FoodItem. It's like adding something to a real shopping list. There's milk, which exists separately, but when you add it to a list you don't just add milk but you can also add quantity, unit of measure, and price associated with milk. Also, by keeping FoodItem as a separate class then it will be easier to code a future enhancement of keeping a list of past items the user can choose from when creating a new or modifying an existing list.