SE450: Horstmann Chapter 2

Contents [0/76]

Object-Oriented Design & Patterns [1/76]
Chapter Topics [2/76]
From Problem to Code [3/76]
Analysis Phase [4/76]
Design Phase [5/76]
Implementation Phase [6/76]
Object and Class Concepts [7/76]
Identifying Classes [8/76]
Identifying Classes [9/76]
Categories of Classes [10/76]
Identifying Responsibilities [11/76]
Responsibilities [12/76]
Class Relationships [13/76]
Dependency Relationship [14/76]
Coupling [15/76]
Aggregation [16/76]
Multiplicities [17/76]
Inheritance [18/76]
Use Cases [19/76]
Sample Use Case [20/76]
Sample Use Case -- Variations [21/76]
CRC Cards [22/76]
CRC Cards [23/76]
CRC Cards [24/76]
Walkthroughs [25/76]
Walkthroughs [26/76]
UML Diagrams [27/76]
Class Diagrams [28/76]
Class Diagrams [29/76]
Class Relationships [30/76]
Multiplicities [31/76]
Composition [32/76]
Association [33/76]
Association [34/76]
Interface Types [35/76]
Tips [36/76]
Sequence Diagrams [37/76]
Self call [38/76]
Object Construction [39/76]
State Diagram [40/76]
Design Documentation [41/76]
Case Study: Voice Mail System [42/76]
Use Case: Reach an Extension [43/76]
Use Case: Leave a Message [44/76]
Use Case: Log in [45/76]
Use Case: Retrieve Messages [46/76]
Use Case: Retrieve Messages [47/76]
Use Case: Change the Greeting [48/76]
Use Case: Change the Greeting [49/76]
Use Case: Change the Passcode [50/76]
Use Case: Change the Passcode [51/76]
CRC Cards for Voice Mail System [52/76]
Initial CRC Cards: Mailbox [53/76]
Initial CRC Cards: MessageQueue [54/76]
Initial CRC Cards: MailSystem [55/76]
Telephone [56/76]
Telephone [57/76]
Connection [58/76]
Connection [59/76]
Analyze Use Case: Leave a message [60/76]
Result of Use Case Analysis [61/76]
Result of Use Case Analysis [62/76]
Result of Use Case Analysis [63/76]
Result of Use Case Analysis [64/76]
Analyse Use Case: Retrieve messages [65/76]
Result of Use Case Analysis [66/76]
CRC Summary [67/76]
UML Class Diagram for Mail System [68/76]
Dependency Relationships [69/76]
Aggregation Relationships [70/76]
UML Class Diagram for Voice Mail System [71/76]
Sequence Diagram for Use Case: Leave  a message [72/76]
Interpreting a Sequence Diagram [73/76]
Sequence Diagram for Use Case: Retrieve messages [74/76]
Connection State Diagram [75/76]
Java Implementation [76/76]

Object-Oriented Design & Patterns [1/76]

Cay S. Horstmann

Chapter 2

The Object-Oriented Design Process

horstmann-oodp2

Chapter Topics [2/76]

From Problem to Code [3/76]

Three Phases:
Case Study: Voice Mail System

Analysis Phase [4/76]

Functional Specification

Design Phase [5/76]

Goals
Artifacts

Implementation Phase [6/76]

Object and Class Concepts [7/76]

Identifying Classes [8/76]

Rule of thumb: Look for nouns in problem description

Identifying Classes [9/76]

Focus on concepts, not implementation

Categories of Classes [10/76]

Identifying Responsibilities [11/76]

Rule of thumb: Look for verbs in problem description

Behavior of MessageQueue:

Responsibilities [12/76]

Class Relationships [13/76]

Dependency Relationship [14/76]

Coupling [15/76]

Aggregation [16/76]

Multiplicities [17/76]

Inheritance [18/76]

Use Cases [19/76]

Sample Use Case [20/76]

Leave a Message

  1. Caller dials main number of voice mail system
  2. System speaks prompt
    Enter mailbox number followed by #
  3. User types extension number
  4. System speaks
    You have reached mailbox xxxx. Please leave a message now
  5. Caller speaks message
  6. Caller hangs up
  7. System places message in mailbox

Sample Use Case -- Variations [21/76]

Variation #1

1.1. In step 3, user enters invalid extension number
1.2. Voice mail system speaks
     You have typed an invalid mailbox number.
1.3. Continue with step 2.

Variation #2

2.1. After step 4, caller hangs up instead of speaking message
2.3. Voice mail system discards empty message

CRC Cards [22/76]

CRC Cards [23/76]


CRC Cards [24/76]

Walkthroughs [25/76]

Walkthroughs [26/76]

.


UML Diagrams [27/76]

Class Diagrams [28/76]

Class Diagrams [29/76]

.

Class Relationships [30/76]

.

Multiplicities [31/76]

.

Composition [32/76]

.

Association [33/76]

.

Association [34/76]

.

Interface Types [35/76]

.

Tips [36/76]

Sequence Diagrams [37/76]

,

Self call [38/76]

.

Object Construction [39/76]

.

State Diagram [40/76]

.

Design Documentation [41/76]

Case Study: Voice Mail System [42/76]

Use Case: Reach an Extension [43/76]

  1. User dials main number of system
  2. System speaks prompt
    Enter mailbox number followed by #
  3. User types extension number
  4. System speaks
    You have reached mailbox xxxx. Please leave a message now

Use Case: Leave a Message [44/76]

  1. Caller carries out Reach an Extension
  2. Caller speaks message
  3. Caller hangs up
  4. System places message in mailbox

Use Case: Log in [45/76]

  1. Mailbox owner carries out Reach an Extension
  2. Mailbox owner types password and #
    (Default password = mailbox number. To change, see Change the Passcode)
  3. System plays mailbox menu:
    Enter 1 to retrieve your messages.
    Enter 2 to change your passcode.
    Enter 3 to change your greeting.

Use Case: Retrieve Messages [46/76]

  1. Mailbox owner carries out Log in
  2. Mailbox owner selects "retrieve messages" menu option
  3. System plays message menu:
    Press 1 to listen to the current message
    Press 2 to delete the current message
    Press 3 to save the current message
    Press 4 to return to the mailbox menu
  4. Mailbox owner selects "listen to current message"
  5. System plays current new message, or, if no more new messages, current old message.
    Note: Message is played, not removed from queue
  6. System plays message menu
  7. User selects "delete current message". Message is removed.
  8. Continue with step 3.

Use Case: Retrieve Messages [47/76]

Variation #1

1.1. Start at Step 6
1.2. User selects "save current message".
       Message is removed from new queue and appended to old queue
1.3. Continue with step 3.

Use Case: Change the Greeting [48/76]

  1. Mailbox owner carries out Log in
  2. Mailbox owner selects "change greeting" menu option
  3. Mailbox owner speaks new greeting
  4. Mailbox owner presses #
  5. System sets new greeting

Use Case: Change the Greeting [49/76]

Variation #1: Hang up before confirmation

1.1. Start at step 3.
1.2. Mailbox owner hangs up.
1.3. System keeps old greeting.

Use Case: Change the Passcode [50/76]

  1. Mailbox owner carries out Log in
  2. Mailbox owner selects "change passcode" menu option
  3. Mailbox owner dials new passcode
  4. Mailbox owner presses #
  5. System sets new passcode

Use Case: Change the Passcode [51/76]

Variation #1: Hang up before confirmation

1.1. Start at step 3.
1.2. Mailbox owner hangs up.
1.3. System keeps old passcode.

CRC Cards for Voice Mail System [52/76]

Some obvious classes

Initial CRC Cards: Mailbox [53/76]

.

Initial CRC Cards: MessageQueue [54/76]

.

Initial CRC Cards: MailSystem [55/76]

.

Telephone [56/76]

Telephone [57/76]

.

Connection [58/76]

Connection [59/76]

.

Analyze Use Case: Leave a message [60/76]

  1. User dials extension. Telephone sends number to Connection
    (Add collaborator Telephone to Connection)
  2. Connection asks MailSystem to find matching Mailbox
  3. Connection asks Mailbox for greeting
    (Add responsibility "manage greeting" to Mailbox,
    add collaborator Mailbox to Connection)
  4. Connection asks Telephone to play greeting
  5. User speaks greeting. Telephone asks Connection to record it.
    (Add responsibility "record voice input" to Connection)
  6. User hangs up. Telephone notifies Connection.
  7. Connection constructs Message
    (Add card for Message class,
    add collaborator  Message to Connection)
  8. Connection adds Message to Mailbox

Result of Use Case Analysis [61/76]

.

Result of Use Case Analysis [62/76]

.

Result of Use Case Analysis [63/76]

.

Result of Use Case Analysis [64/76]

.

Analyse Use Case: Retrieve messages [65/76]

  1. User types in passcode. Telephone notifies Connection
  2. Connection asks Mailbox to check passcode.
    (Add responsibility "manage passcode" to Mailbox)
  3. Connection sets current mailbox and asks Telephone to speak menu
  4. User selects "retrieve messages". Telephone passes key to Connection
  5. Connection asks Telephone to speak menu
  6. User selects "listen to current message". Telephone passes key to Connection
  7. Connection gets first message from current mailbox.
    (Add "retrieve messages" to responsibility of Mailbox).
    Connection asks Telephone to speak message
  8. Connection asks Telephone to speak menu
  9. User selects "save current message". Telephone passes key to Connection
  10. Connection tells Mailbox to save message
    (Modify responsibility of Mailbox to "retrieve,save,delete messages")
  11. Connection asks Telephone to speak menu

Result of Use Case Analysis [66/76]

.

CRC Summary [67/76]

UML Class Diagram for Mail System [68/76]

Dependency Relationships [69/76]

.

Aggregation Relationships [70/76]

UML Class Diagram for Voice Mail System [71/76]

.

Sequence Diagram for Use Case: Leave  a message [72/76]

.

Interpreting a Sequence Diagram [73/76]

Sequence Diagram for Use Case: Retrieve messages [74/76]

.

Connection State Diagram [75/76]

.

Java Implementation [76/76]

file:horstmann/ch02_mail/Message.java [source] [doc-public] [doc-private]
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package horstmann.ch02_mail;
/**
   A message left by the caller.
 */
public class Message
{
  /**
      Construct a Message object.
      @param messageText the message text
   */
  public Message(String messageText)
  {
    text = messageText;
  }

  /**
      Get the message text.
      @return message text
   */
  public String getText()
  {
    return text;
  }

  private String text;
}

file:horstmann/ch02_mail/MessageQueue.java [source] [doc-public] [doc-private]
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package horstmann.ch02_mail;
import java.util.ArrayList;

/**
   A first-in, first-out collection of messages. This
   implementation is not very efficient. We will consider
   a more efficient implementation in chapter 3.
 */
public class MessageQueue
{
  /**
      Constructs an empty message queue.
   */
  public MessageQueue()
  {
    queue = new ArrayList<Message>();
  }

  /**
      Remove message at head.
      @return message that has been removed from the queue
   */
  public Message remove()
  {
    return queue.remove(0);
  }

  /**
      Append message at tail.
      @param newMessage the message to be appended
   */
  public void add(Message newMessage)
  {
    queue.add(newMessage);
  }

  /**
      Get the total number of messages in the queue.
      @return the total number of messages in the queue
   */
  public int size()
  {
    return queue.size();
  }

  /**
      Get message at head.
      @return message that is at the head of the queue, or null
      if the queue is empty
   */
  public Message peek()
  {
    if (queue.size() == 0) return null;
    else return queue.get(0);
  }

  private ArrayList<Message> queue;
}

file:horstmann/ch02_mail/Mailbox.java [source] [doc-public] [doc-private]
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
package horstmann.ch02_mail;
/**
   A mailbox contains messages that can be listed, kept or discarded.
 */
public class Mailbox
{
  /**
      Creates Mailbox object.
      @param aPasscode passcode number
      @param aGreeting greeting string
   */
  public Mailbox(String aPasscode, String aGreeting)
  {
    passcode = aPasscode;
    greeting = aGreeting;
    newMessages = new MessageQueue();
    keptMessages = new MessageQueue();
  }

  /**
      Check if the passcode is correct.
      @param aPasscode a passcode to check
      @return true if the supplied passcode matches the mailbox passcode
   */
  public boolean checkPasscode(String aPasscode)
  {
    return aPasscode.equals(passcode);
  }

  /**
      Add a message to the mailbox.
      @param aMessage the message to be added
   */
  public void addMessage(Message aMessage)
  {
    newMessages.add(aMessage);
  }

  /**
      Get the current message.
      @return the current message
   */
  public Message getCurrentMessage()
  {
    if (newMessages.size() > 0)
      return newMessages.peek();
    else if (keptMessages.size() > 0)
      return keptMessages.peek();
    else
      return null;
  }

  /**
      Remove the current message from the mailbox.
      @return the message that has just been removed
   */
  public Message removeCurrentMessage()
  {
    if (newMessages.size() > 0)
      return newMessages.remove();
    else if (keptMessages.size() > 0)
      return keptMessages.remove();
    else
      return null;
  }

  /**
      Save the current message
   */
  public void saveCurrentMessage()
  {
    Message m = removeCurrentMessage();
    if (m != null)
      keptMessages.add(m);
  }

  /**
      Change mailbox's greeting.
      @param newGreeting the new greeting string
   */
  public void setGreeting(String newGreeting)
  {
    greeting = newGreeting;
  }

  /**
      Change mailbox's passcode.
      @param newPasscode the new passcode
   */
  public void setPasscode(String newPasscode)
  {
    passcode = newPasscode;
  }

  /**
      Get the mailbox's greeting.
      @return the greeting
   */
  public String getGreeting()
  {
    return greeting;
  }

  private MessageQueue newMessages;
  private MessageQueue keptMessages;
  private String greeting;
  private String passcode;
}

file:horstmann/ch02_mail/Connection.java [source] [doc-public] [doc-private]
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
package horstmann.ch02_mail;
/**
   Connects a phone to the mail system. The purpose of this
   class is to keep track of the state of a connection, since
   the phone itself is just a source of individual key presses.
 */
@SuppressWarnings("all")
public class Connection
{
  /**
      Construct a Connection object.
      @param s a MailSystem object
      @param p a Telephone object
   */
  public Connection(MailSystem s, Telephone p)
  {
    system = s;
    phone = p;
    resetConnection();
  }

  /**
      Respond to the user's pressing a key on the phone touchpad
      @param key the phone key pressed by the user
   */
  public void dial(String key)
  {
    if (state == CONNECTED)
      connect(key);
    else if (state == RECORDING)
      login(key);
    else if (state == CHANGE_PASSCODE)
      changePasscode(key);
    else if (state == CHANGE_GREETING)
      changeGreeting(key);
    else if (state == MAILBOX_MENU)
      mailboxMenu(key);
    else if (state == MESSAGE_MENU)
      messageMenu(key);
  }

  /**
      Record voice.
      @param voice voice spoken by the user
   */
  public void record(String voice)
  {
    if (state == RECORDING || state == CHANGE_GREETING)
      currentRecording += voice;
  }

  /**
      The user hangs up the phone.
   */
  public void hangup()
  {
    if (state == RECORDING)
      currentMailbox.addMessage(new Message(currentRecording));
    resetConnection();
  }

  /**
      Reset the connection to the initial state and prompt
      for mailbox number
   */
  private void resetConnection()
  {
    currentRecording = "";
    accumulatedKeys = "";
    state = CONNECTED;
    phone.speak(INITIAL_PROMPT);
  }

  /**
      Try to connect the user with the specified mailbox.
      @param key the phone key pressed by the user
   */
  private void connect(String key)
  {
    if (key.equals("#"))
    {
      currentMailbox = system.findMailbox(accumulatedKeys);
      if (currentMailbox != null)
      {
        state = RECORDING;
        phone.speak(currentMailbox.getGreeting());
      }
      else
        phone.speak("Incorrect mailbox number. Try again!");
      accumulatedKeys = "";
    }
    else
      accumulatedKeys += key;
  }

  /**
      Try to log in the user.
      @param key the phone key pressed by the user
   */
  private void login(String key)
  {
    if (key.equals("#"))
    {
      if (currentMailbox.checkPasscode(accumulatedKeys))
      {
        state = MAILBOX_MENU;
        phone.speak(MAILBOX_MENU_TEXT);
      }
      else
        phone.speak("Incorrect passcode. Try again!");
      accumulatedKeys = "";
    }
    else
      accumulatedKeys += key;
  }

  /**
      Change passcode.
      @param key the phone key pressed by the user
   */
  private void changePasscode(String key)
  {
    if (key.equals("#"))
    {
      currentMailbox.setPasscode(accumulatedKeys);
      state = MAILBOX_MENU;
      phone.speak(MAILBOX_MENU_TEXT);
      accumulatedKeys = "";
    }
    else
      accumulatedKeys += key;
  }

  /**
      Change greeting.
      @param key the phone key pressed by the user
   */
  private void changeGreeting(String key)
  {
    if (key.equals("#"))
    {
      currentMailbox.setGreeting(currentRecording);
      currentRecording = "";
      state = MAILBOX_MENU;
      phone.speak(MAILBOX_MENU_TEXT);
    }
  }

  /**
      Respond to the user's selection from mailbox menu.
      @param key the phone key pressed by the user
   */
  private void mailboxMenu(String key)
  {
    if (key.equals("1"))
    {
      state = MESSAGE_MENU;
      phone.speak(MESSAGE_MENU_TEXT);
    }
    else if (key.equals("2"))
    {
      state = CHANGE_PASSCODE;
      phone.speak("Enter new passcode followed by the # key");
    }
    else if (key.equals("3"))
    {
      state = CHANGE_GREETING;
      phone.speak("Record your greeting, then press the # key");
    }
  }

  /**
      Respond to the user's selection from message menu.
      @param key the phone key pressed by the user
   */
  private void messageMenu(String key)
  {
    if (key.equals("1"))
    {
      String output = "";
      Message m = currentMailbox.getCurrentMessage();
      if (m == null) output += "No messages." + "\n";
      else output += m.getText() + "\n";
      output += MESSAGE_MENU_TEXT;
      phone.speak(output);
    }
    else if (key.equals("2"))
    {
      currentMailbox.saveCurrentMessage();
      phone.speak(MESSAGE_MENU_TEXT);
    }
    else if (key.equals("3"))
    {
      currentMailbox.removeCurrentMessage();
      phone.speak(MESSAGE_MENU_TEXT);
    }
    else if (key.equals("4"))
    {
      state = MAILBOX_MENU;
      phone.speak(MAILBOX_MENU_TEXT);
    }
  }

  private MailSystem system;
  private Mailbox currentMailbox;
  private String currentRecording;
  private String accumulatedKeys;
  private Telephone phone;
  private int state;

  private static final int DISCONNECTED = 0;
  private static final int CONNECTED = 1;
  private static final int RECORDING = 2;
  private static final int MAILBOX_MENU = 3;
  private static final int MESSAGE_MENU = 4;
  private static final int CHANGE_PASSCODE = 5;
  private static final int CHANGE_GREETING = 6;

  private static final String INITIAL_PROMPT =
      "Enter mailbox number followed by #";
  private static final String MAILBOX_MENU_TEXT =
      "Enter 1 to listen to your messages\n"
          + "Enter 2 to change your passcode\n"
          + "Enter 3 to change your greeting";
  private static final String MESSAGE_MENU_TEXT =
      "Enter 1 to listen to the current message\n"
          + "Enter 2 to save the current message\n"
          + "Enter 3 to delete the current message\n"
          + "Enter 4 to return to the main menu";
}











file:horstmann/ch02_mail/MailSystem.java [source] [doc-public] [doc-private]
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package horstmann.ch02_mail;
import java.util.ArrayList;

/**
   A system of voice mail boxes.
 */
public class MailSystem
{
  /**
      Constructs a mail system with a given number of mailboxes
      @param mailboxCount the number of mailboxes
   */
  public MailSystem(int mailboxCount)
  {
    mailboxes = new ArrayList<Mailbox>();

    // Initialize mail boxes.

    for (int i = 0; i < mailboxCount; i++)
    {
      String passcode = "" + (i + 1);
      String greeting = "You have reached mailbox " + (i + 1)
          + ". \nPlease leave a message now.";
      mailboxes.add(new Mailbox(passcode, greeting));
    }
  }

  /**
      Locate a mailbox.
      @param ext the extension number
      @return the mailbox or null if not found
   */
  public Mailbox findMailbox(String ext)
  {
    int i = Integer.parseInt(ext);
    if (1 <= i && i <= mailboxes.size())
      return  mailboxes.get(i - 1);
    else return null;
  }

  private ArrayList<Mailbox> mailboxes;
}

file:horstmann/ch02_mail/Telephone.java [source] [doc-public] [doc-private]
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package horstmann.ch02_mail;
import java.util.Scanner;

/**
   A telephone that takes simulated keystrokes and voice input
   from the user and simulates spoken text.
 */
public class Telephone
{
  /**
      Construct phone object.
      @param aScanner that reads text from a character-input stream
   */
  public Telephone(Scanner aScanner)
  {
    scanner = aScanner;
  }

  /**
      Speak a message to System.out.
      @param output the text that will be "spoken"
   */
  public void speak(String output)
  {
    System.out.println(output);
  }

  /**
      Loops reading user input and passes the input to the
      Connection object's methods dial, record or hangup.
      @param c the connection that connects this phone to the
      voice mail system
   */
  public void run(Connection c)
  {
    boolean more = true;
    while (more)
    {
      String input = scanner.nextLine();
      if (input == null) return;
      if (input.equalsIgnoreCase("H"))
        c.hangup();
      else if (input.equalsIgnoreCase("Q"))
        more = false;
      else if (input.length() == 1
          && "1234567890#".indexOf(input) >= 0)
        c.dial(input);
      else
        c.record(input);
    }
  }

  private Scanner scanner;
}

file:horstmann/ch02_mail/MailSystemTester.java [source] [doc-public] [doc-private]
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;
}

Revised: 2007/09/11 16:16