70 lines
2.5 KiB
Java
70 lines
2.5 KiB
Java
/**
|
|
* P3Type.java
|
|
* This interface will be used to hold constants for P3.
|
|
* It extends Serializable so that classes which implement this interface
|
|
* can be saved to a file
|
|
*
|
|
* Created: Fri Aug 02 11:45:48 2002
|
|
*
|
|
* @author <a href="mailto:bsbeck@cc.gatech.edu "> Brandon Beck </a>
|
|
* @version 1.0
|
|
*/
|
|
|
|
import java.io.*;
|
|
|
|
public interface P3Type extends Serializable
|
|
{
|
|
|
|
// This variable holds the default size of the hash table.
|
|
public static final int DEFAULT_SIZE = 10;
|
|
|
|
// This variable holds a constant String saying that a person has never
|
|
// been issued a mailbox before
|
|
public static final String NO_MAILBOX = "The current customer "
|
|
+ "has never been issued a mailbox before!";
|
|
|
|
// This variable represents that the person trying to send the mail
|
|
// does not have a mailbox
|
|
public static final int BAD_SENDER = -1;
|
|
|
|
// This variable represents that the person the mail is sent to
|
|
// does not have a mailbox
|
|
public static final int NO_RECIPIENT = -2;
|
|
|
|
// This variable represents that the mail was sent successfully
|
|
public static final int MAIL_SENT = 1;
|
|
|
|
// This variable holds a constant int representing that a person has not
|
|
// been issued a mailbox before
|
|
public static final int NO_MAILBOX_NUM = -3;
|
|
|
|
// This variable holds a String telling the customer how many of his
|
|
// telegrams got thrown away when he closed his mailbox
|
|
public static final String NUM_TELEGRAMS = "The number of unread " +
|
|
"telegrams when you closed your mailbox was ";
|
|
|
|
// This will be the String constant of the initial menu. These are the
|
|
// initial actions that a manager of the PostOffice can perform.
|
|
public static final String INIT_ACTIONS =
|
|
"1) Help Customer \n" +
|
|
"2) Add More Rooms \n" +
|
|
"3) View All MailBoxes \n" +
|
|
"0) Leave for the Day \n";
|
|
|
|
// This will be the String constant of the customer menu. These are the
|
|
// actions of a customer
|
|
public static final String CUST_HERE =
|
|
"1) I want a mailbox at this post office. \n" +
|
|
"2) I no longer want a post office at this mailbox. \n" +
|
|
"3) I want to send a telegram. \n" +
|
|
"4) I want to read all of the telegrams I have received. \n" +
|
|
"0) Okay, I am done. \n";
|
|
|
|
// This is a string representing the file to save the Post Office to
|
|
public static final String POST_OFFICE = "MyPO";
|
|
|
|
// This is a string saying goodbye to the manager
|
|
public static final String GOOD_BYE = "See you tomorrow";
|
|
|
|
} // end P3Type
|