Source of MailSystemTester.java


  1: import java.util.Scanner;

  3: /**
  4:    This program tests the mail system. A single phone
  5:    communicates with the program through System.in/System.out.
  6: */
  7: public class MailSystemTester
  8: {
  9:    public static void main(String[] args)
 10:    {
 11:       MailSystem system = new MailSystem(MAILBOX_COUNT);
 12:       Scanner console = new Scanner(System.in);
 13:       Telephone p = new Telephone(console);
 14:       Connection c = new Connection(system, p);
 15:       p.run(c);
 16:    }

 18:    private static final int MAILBOX_COUNT = 20;
 19: }