-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
29 lines (22 loc) · 865 Bytes
/
Copy pathMain.java
File metadata and controls
29 lines (22 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package org.vashonsd;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
ArrayList<foodBot> waiters = new ArrayList<foodBot>();
waiters.add(new foodBot("Mexican"));
waiters.add(new foodBot("Japanese"));
waiters.add(new foodBot("Canadian"));
waiters.add(new foodBot("Thai"));
waiters.add(new foodBot("American"));
waiters.add(new foodBot("Human"));
//The next three lines get us a random foodBot from the waiters ArrayList.
Random rand = new Random();
int whichWaiter = rand.nextInt(waiters.size()-1);
foodBot f = waiters.get(whichWaiter);
System.out.println(f.getGreeting());
System.out.println(f.getCourse());
System.out.println(f.getCheck());
}
}