[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Labs] [More Labs] [Assignments] [Quizzes] [Exams] [Examples] [Book] [Tutorial] [API]
This is a short collection of notes on the project, primarily copied from selected outlines.
Mailbox talks to the mail storage server.
Sender talks to the outgoing mail server.
Folders.
inbox.
trash folder.
Sorter to organize them or a Filter
to select only some,
Composer to compose new messages.
AddressBook class (which may somehow
communicate with the address book on the server).
FaceBook class so that we can display
peoples' pictures when we receive messages from them.
Mailbox class. What methods should that class
provide?
Mailbox. That way,
we get the mailbox for a particular person. We also handle the
question of how to get the password and account to the class.
public Mailbox(String account, String password) { ... }
public MessageInfoList listMessages() { ... }
public MailMessage getMessage(String messageID) { ... }
public void deleteMessage(String messageID) { ... }
public void isValid() { ... }
import MailMessage;
import MessageInfoList;
/**
* A simple implementation of mailboxes (one that doesn't really work).
* Created as an example for CSC152 99F.
*
* @author Samuel A. Rebelsky
* @author The students of CSC152 99F
* @version 1.0 of September 1999
*/
public class Mailbox {
// +--------------+--------------------------------------------
// | Constructors |
// +--------------+
/**
* Create a new mailbox for a particular user. Requires the
* account and password for obvious reasons.
*/
public Mailbox(String account, String password) {
// ...
} // Mailbox(String, String)
// +---------+-------------------------------------------------
// | Methods |
// +---------+
/** List all the messages in the mailbox. */
public MessageInfoList listMessages() {
return new MessageInfoList(); // STUB
} // listMessages()
/** Get one message. */
public MailMessage getMessage(String messageID) {
return new MailMessage(); // STUB
} // getMessage(String)
/** Delete a message. */
public void deleteMessage(String messageID) {
return; // STUB
} // deleteMessage(String)
/** Check if the mailbox is valid. */
public boolean isValid() {
return true; // STUB
} // isValid()
} // class Mailbox
import Mailbox;
import MailMessage;
import MessageInfoList;
import SimpleInput;
import SimpleOutput;
/**
* A simple controlling class to print out the contents of a
* user's mailbox.
*
* @author Samuel A. Rebelsky
* @author The Students of CSC152 99S
* @version 1.0 of September 1999
*/
public class MailDumper {
public static void main(String[] args) {
// Prepare for input and output.
SimpleInput eyes = new SimpleInput();
SimpleOutput pen = new SimpleOutput();
// Other necessary variables.
String account; // The user's account.
String password; // The user's password.
Mailbox mail; // The mailbox we create.
MessageInfoList messages;
// A list of messages in that mailbox.
MailMessage msg; // One mail message.
// 1. Get the account and password. Note that we eventually
// need to update this so that the password is not visible.
pen.print("Account: ");
account = eyes.readString();
pen.print("Password: ");
password = eyes.readString();
// 2. Create the mailbox.
mail = new Mailbox(account, password);
// 3. Ensure that the mailbox was correctly created. If not,
// crash and burn, but in a friendly way.
// ...
// 4. Get the list of messages
// ...
// 5. For each message in that list
// ...
// a. Get the full message
// ...
// b. Print it out
pen.println(msg.toString());
} // main(String[] args)
} // class MailDumper
+----------+
+------| Maildrop |----+ +-------------+
| +----------+ +-+-| Text Client |
+---------+ +---------+ +---------+ | | +-------------+
| Servers |---| Network |---| Mailbox |--+ | |
+---------+ +---------+ +---------+ | | +-----+ |
| +-+-| GUI | |
+-------------+ +---------+ +-----+ +--------+
| MailMessage | | Folders | | \------| Filter |
+-------------+ +---------+ | +--------+
|
+-------------+ +-------+ +---------------+
| MsgInfoList | | Prefs | | Face Database |
+-------------+ +-------+ +---------------+
MailMessage, MsgInfoList, and
Prefs are
utility classes that will be shared by many of the
other classes (or groups of classes).
We will eventually segment to project into reasonable-size parts. Here are my initial categories. See the list of teams and their projects for more information on each subproject.
[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Labs] [More Labs] [Assignments] [Quizzes] [Exams] [Examples] [Book] [Tutorial] [API]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS152/99F/Handouts/project-notes.html
Source text last modified Wed Sep 22 13:28:18 1999.
This page generated on Wed Sep 22 13:26:19 1999 by Siteweaver. Validate this page's HTML.
Contact our webmaster at rebelsky@grinnell.edu