01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
package horstmann.ch02_mail;
import java.util.Scanner;

/**
   This program tests the mail system. A single phone
   communicates with the program through System.in/System.out.
 */
public class MailSystemTester
{
  public static void main(String[] args)
  {
    MailSystem system = new MailSystem(MAILBOX_COUNT);
    Scanner console = new Scanner(System.in);
    Telephone p = new Telephone(console);
    Connection c = new Connection(system, p);
    p.run(c);
  }

  private static final int MAILBOX_COUNT = 20;
}