Skip to content

Commit

Permalink
simplified add() code
Browse files Browse the repository at this point in the history
  • Loading branch information
bethrobson committed Aug 26, 2020
1 parent e49257d commit 4f78ed1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void addItem(String name, String description,
boolean vegetarian, double price)
{
MenuItem menuItem = new MenuItem(name, description, vegetarian, price);
menuItems.put(menuItem.getName(), menuItem);
menuItems.put(name, menuItem);
}

public Map<String, MenuItem> getItems() {
Expand Down

0 comments on commit 4f78ed1

Please sign in to comment.