Fundamentals of Computer Science II (CSC-152 99F)


Assignment 1: Your First Class: Mail Messages

Preliminaries

Assigned: Monday, 6 September 1999
Due: 4 p.m., Tuesday, 14 September 1999

Summary: In this assignment, you will create and test a class, MailMessage that might be used to represent messages in our email system.

Turning it in: Leave your code in a publically readable directory and email me the location of that directory.

Collaboration: While you may discuss ideas about this assignment with each other, you should each write and turn in his or her own programs. You may also help each other debug your code.

A Mail Message Class

As a class, we have decided to develop a new mail client that might be used with pioneerserver and other IMAP servers (and, potentially, other MS Exchange Servers). Our goal is to create a client that can easily be used in public labs and on a variety of platforms.

At the core of any email client are the messages that the system receives and transmits. Hence, it is especially important that we think carefully about the structure of the objects that we will use to represent messages.

Develop a MailMessage class that we might use to represent messages. In developing the class, you should think about the important aspects of each mail message. Remember that the internals of a message might differ from the external appearance.

Don't forget that your class will need methods as well as fields. In addition to methods for setting and getting the various attributes of the message, you should provide at least the following methods:

You may think of others.

Once you have created the class, write a short program to test it. Your test program will most likely create, update, generate replies to, and print messages.

Extra Credit

For extra credit, write a constructor that takes one parameter: the mail message in the standard format that you get when saving from an email program and parses that format to create the message. The structure of the constructor will be

public MailMessage(String msg) {
  // ...
} 

You may also extend makeReply to take a boolean parameter, Quote. If quote is true, include a ``quoted'' version of the body of the original message in the reply. If quote is false, do not include the in the reply.

You may also receive extra credit for particularly interesting or appropriate designs that stand out from the rest of the class.

History

Monday, 6 September 1999

Wednesday, 8 September 1999

Thursday, 9 September 1999


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/Assignments/assign.01.html

Source text last modified Thu Sep 9 21:58:11 1999.

This page generated on Thu Sep 9 22:07:02 1999 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu