COMP2396
Loading...
Searching...
No Matches
tutorial4.part3.q4.Main Class Reference

Static Public Member Functions

static void main (String[] args) throws Exception
 

Detailed Description

Definition at line 5 of file Main.java.

Member Function Documentation

◆ main()

static void tutorial4.part3.q4.Main.main ( String[] args) throws Exception
inlinestatic

Definition at line 6 of file Main.java.

6 {
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 }

References tutorial4.part3.q4.Restaurant.add_table(), and tutorial4.part3.q4.Restaurant.make_reservation().

Here is the call graph for this function:

The documentation for this class was generated from the following file: