E-mail Project: Putting it All Together!
Assigned Monday, 2/18/02.
Design document due Wednesday, 2/20/02
Originally Due Wednesday, 2/27/02, by 9:00PM
Extended until Wednesday, 3/6/02, by 9:00 PM.
NEWS!!!
- Never use the MailTools class again. Ever. I mean it. If you have it on
your computer at home, delete it.
- If you are using your own Inbox.java or Message.java files, remove any references
to MailTools. Your refresh method should just run on whatever inbox.txt file
happens to be sitting in your K: folder. If you want an inbox.txt to work
on that I've made, you can find one in S:\Shared_Faculty_Files\Musicant. Your
program does not need to successfully send an email message.
- If you are using my DaveInbox.java file, I have placed an updated safe one
in the labs. It will no longer refresh your inbox from the mail server, but
instead read whatever inbox.txt happens to be sitting in your K: folder. If
you want an inbox.txt to work on that I've made, you can find one in S:\Shared_Faculty_Files\Musicant.
Your program does not need to successfully send an email message. If you are
working from home, delete the Inbox.class and Message.class files that you
downloaded from me. Download this DaveInbox.class
and Message.class instead.
- Remove your password or the code to ask for the password from your code.
Instead, always use the password "cs117". This should never matter
at all, since we're not using the mail server anymore. But if somehow you
screw up and manage to find the mail server anyway, a bad password will ensure
that you never actually connect.
Overview
This is the assignment where you will finally put everything together and create
a fully functioning email tool.
The assignment
Create a class called EmailApplication that offers the following functionality:
- Refresh your current inbox.
- List all your email messages, showing who the message is to, from, the subject,
and the date
- Delete messages. This doesn't technically delete the messages on the server
-- if you refresh the messages would still be there. But you can delete them
within your email application.
- Sort messages by date, to, from, and subject.
- View the text for a particular email message.
- Compose a new email message (consisting of one line of text).
- Save a new message that you're currently working on so that you can work
on it again later, even if you quit your program and start it up again later.
You should use the Message class
that you created for Assignment 5 for this project, and the Inbox
class you created for Assignment 9. If you were unable to successfully make
Assignment 5 work, you are welcome to use my Message.class
and my DaveInbox.class. If you choose to use either
of my class files, place them inside your BlueJ project folder. You will not
actually see the classes from within BlueJ, but you'll be able to use them as
if they were built into Java.
If you choose to use my DaveInbox class, you'll need to extend it to add your
own methods. To do this, create your own class called MyInbox as follows:
class MyInbox extends DaveInbox
{
// All your additional methods go here
}
I've also produced javadocs for my DaveInbox class
for you to look at.
Though we haven't talked about it in class, you may want to look up how to
use the javabook classes MultiInputBox
and ListBox work. They aren't
necessary, but they make for a slicker looking program.
You should not use the basicio package at all for this assignment, but rather
handle input and output through the standard Java methods that we will talk
about.
Working from home
As with the previous assignments, you have to install some extra stuff on your
home system if you want the project to work. Remember to do this early,
since no one has tested this out for me yet! Luckily, there is nothing for this
assignment that you need in addition to what was needed for Assignment #6.
Design Document
WARNING. This is a BIG assignment! You'll have no hope of completing it if
you wait until a day or two before it is due to start it. The design document
I am asking you to submit is to help you get started and to get a sense of how
you'll code it up.
In building any software probject, you need to make lots of decisions as to
how to design your system. It makes sense to think about these things before
you actually start coding - it will save you lots of time in the long run. The
design document should contain the following information:
- Descriptions of the classes you will need to solve the problem, including
variables and methods
- Prototypes of the methods you will need
- Descriptions of the purpose for each method and function
- Descriptions of the variables, arrays, etc. you will need to store and
manage the information
- Estimates of how long it will take you to write each of the methods. Consider
how long it will take to translate the pseudocode into actual Java code, then
remember to leave lots of time for debugging and testing. Include a schedule,
by day of the week, when you will work on each aspect of the program.
- Your test plan: how will you test each of these functions individually
to make sure they work?
Good luck!
Dave Musicant, Department
of Mathematics and Computer Science, Carleton
College, Northfield, MN 55057, dmusican@carleton.edu