-
Notifications
You must be signed in to change notification settings - Fork 686
Expand file tree
/
Copy pathRestaurant.java
More file actions
24 lines (20 loc) · 1.05 KB
/
Restaurant.java
File metadata and controls
24 lines (20 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.launchcode;
import java.time.LocalDate;
import java.util.ArrayList;
public class Restaurant {
public static void main(String[] args) {
MenuItem greenEggsAndHam = new MenuItem("Green Eggs and Ham", 10.00, "delicious green eggs and ham!", "breakfast", LocalDate.now().minusDays(40), true);
System.out.println(greenEggsAndHam);
MenuItem porridge = new MenuItem("Goldilocks' Porridge", 6.00, "Oatmeal at just the right temp!", "breakfast", LocalDate.now(), true);
ArrayList<MenuItem> menuItems = new ArrayList<>();
menuItems.add(greenEggsAndHam);
menuItems.add(porridge);
Menu menu = new Menu(LocalDate.now(),menuItems);
MenuItem blueberryPancakes = new MenuItem("Blueberry Pancakes", 13.00, "a delicious stack of pancakes", "breakfast", LocalDate.now(), true);
menu.addMenuItem(blueberryPancakes);
menu.removeMenuItem(blueberryPancakes);
System.out.println(menu);
greenEggsAndHam.calculateIsNew();
System.out.println(greenEggsAndHam.getNew());
}
}