Description
PRG/421 Week 4 Java 4.13 LAB: Grocery shopping list (LinkedList)
Given a ListItem class, complete the main() using the built-in LinkedList type to create a linked list called shoppingList. The program should read items from input (ending with -1), adding each item to shoppingList, and output each item in shoppingList using the printNodeData() method.
Ex. If the input is
milk
bread
eggs
waffles
cereal
-1
the output is
milk
bread
eggs
waffles
cereal
Reviews
There are no reviews yet.