01: import java.io.BufferedReader;
02: import java.io.InputStreamReader;
03: import java.io.IOException;
04:
05: /**
06: This program tests the mail system. A single phone
07: communicates with the program through System.in/System.out.
08: */
09: public class MailSystemTest
10: {
11: public static void main(String[] args) throws IOException
12: {
13: MailSystem system = new MailSystem(MAILBOX_COUNT);
14: BufferedReader console = new BufferedReader(
15: new InputStreamReader(System.in));
16:
17: Telephone p = new Telephone(console);
18: Connection c = new Connection(system, p);
19: p.run(c);
20: }
21:
22: private static final int MAILBOX_COUNT = 20;
23: }