46 lines
695 B
Java
46 lines
695 B
Java
// enums/menu/Meal.java
|
|
// (c)2020 MindView LLC: see Copyright.txt
|
|
// We make no guarantees that this code is fit for any purpose.
|
|
// Visit http://OnJava8.com for more book information.
|
|
// {java enums.menu.Meal}
|
|
package enums.menu;
|
|
|
|
public class Meal {
|
|
public static void main(String[] args) {
|
|
for(int i = 0; i < 5; i++) {
|
|
for(Course course : Course.values()) {
|
|
Food food = course.randomSelection();
|
|
System.out.println(food);
|
|
}
|
|
System.out.println("***");
|
|
}
|
|
}
|
|
}
|
|
/* Output:
|
|
SPRING_ROLLS
|
|
VINDALOO
|
|
FRUIT
|
|
DECAF_COFFEE
|
|
***
|
|
SOUP
|
|
VINDALOO
|
|
FRUIT
|
|
TEA
|
|
***
|
|
SALAD
|
|
BURRITO
|
|
FRUIT
|
|
TEA
|
|
***
|
|
SALAD
|
|
BURRITO
|
|
CREME_CARAMEL
|
|
LATTE
|
|
***
|
|
SOUP
|
|
BURRITO
|
|
TIRAMISU
|
|
ESPRESSO
|
|
***
|
|
*/
|