COMP2396
Loading...
Searching...
No Matches
Main.java
Go to the documentation of this file.
1package tutorial4.part3.q4;
2
3import java.io.*;
4
5public class Main {
6 public static void main(String[] args) throws Exception {
7 Restaurant res = new Restaurant("Hang Ten Restaurant");
8 res.add_table("T1", 2);
9 res.add_table("T2", 2);
10 res.add_table("T3", 4);
11 res.add_table("T4", 4);
12
13 InputStreamReader isr = new InputStreamReader(System.in);
14 BufferedReader inData = new BufferedReader(isr);
15
16 String input = inData.readLine();
17 while (!input.equals("Exit")) {
18 int n = Integer.parseInt(input);
19 System.out.println(res.make_reservation(n));
20 input = inData.readLine();
21 }
22
23 System.out.println("bye");
24 }
25}
static void main(String[] args)
Definition Main.java:6
void add_table(String name, int capacity)