Assigned | Tuesday, April 10, 2012 |
Program Due | Monday, April 23, 2012, 9:00am |
Weight | 9% |
Updates |
To gain experience
In the information age, the storage and retrieval of documents has become a fundamental requirement of any company. The ability to query documents about their content is also essential to the company's smooth operation. In this project, you will build a small document storage system that contains documents of various types. You will also write a menu-driven user interface that allows users to create and store documents, archive documents, retrieve documents, and make inquiries about the documents.
In this project, you will design and implement a document storage system that will be used by the MitchBer software consulting firm. This system stores internal company reports and company correspondence, such as memos and emails. All relevant document information will be input by the user. Documents are initially stored in an “active” document list. Upon request, a document may be moved from the active list to the document “archive.” An archive is a place where documents that are no longer used, or “active,” are stored, as opposed to disposing of them. Sort of like a recycle bin. Your system should also allow a user to reactivate a document by moving it back from the document archive to the active list.
When a document is initially stored, the author and the date/time created are recorded. A unique document identification number is assigned to the document starting with 10001. The document number (its ID) is incremented for each subsequent document stored. Your document storage system must be able to store an unlimited number of documents.
In addition to author, date/time, and document ID, which are common to all documents, company reports include a title. Your system must also store memos, which are a kind of correspondence. Memos include the name of the person to whom the memo is being sent, a list of people who will receive a copy of the memo (the distribution list), and the subject of the memo. Email must be stored in your document storage system as well. Emails are electronic correspondence that include the email's subject, the name of the person to whom it is being sent, along with his/her email address.
Your document system must provide the following services for the user. Your user menu will display these options, in this order, and accept an integer menu selection from the user.
Create and store an email message
This service should accept all necessary email information followed by the contents of the email. This service will display the document ID assigned to the email.
Create and store a memo
This service should accept all necessary memo information followed by the body (contents) of the memo. Since there is no limit on the number of names on the distribution list, your program should continue to accept names (one per line) until the user types “END” (without the quotes, in upper-, lower-, or camel-case) at the begining of a separate line. This service will display the document ID assigned to the memo.
Create and store a report
This service accepts all necessary report information followed by the contents of the report. This service will display the document ID assigned to the report.
Display a single document
The user inputs a document ID and all relevant document information is displayed followed by the document body. The document may be either active or archived.
List all active documents stored in the system
For each document that HAS NOT been archived, this service displays the document's ID, author, and creation date/time, and any document-specific information, in order by document ID. The body of the documents are NOT displayed.
List all archived documents stored in the system
For each document that HAS been archived, this service displays the document's ID, author, and creation date/time, and any document-specific information, in order by document ID. The body of the documents are NOT displayed.Search all active documents for a specified word or phrase
The user inputs a word or phrase on a single line. A listing of the IDs of the active documents that contain the word/phrase in their text body is displayed in document ID order. It is NOT necessary to find phrases that are split across lines. Additionally, the search should ignore case. For example, “BOB was HERE” will match “bob was here”.
Archive a document
The user inputs the document ID of the document to be archived. The system responds with an appropriate message indicating whether or not the document was archived.
Retrieve a document from the archive
The user inputs the document ID of the archived document that he/she wishes to return to the active list of documents. The system responds with an appropriate message indicating whether or not the document was returned to the active list.
Empty the archive
All archived documents are permanently removed from the document system.
Quit the program
Your program exits gracefully.
proj4
.main( )
which provides the user interfacemain( )
and all its helper methods must be implemented in Project4.java.private
. No protected
variables are permitted.Date
class provided by the Java library (java.util) for storing and printing the creation date/time information.main( )
and all of its helper methods.main( )
will rely on the DSS to perform the user's
request. Other than constructors, the code in main( )
will not call any methods of any class other than the DSS.This project is considered an CLOSED project. Please review the CLOSED project policy on the course website.
See the course website for a description of how your project will be graded.
.java
files
necessary to compile and run your project.submitls
to verify they are in the remote directoryThe order in which the files are listed doesn't matter. However, you must make sure that all files necessary to compile and run your project are submitted. You need not submit all files at the same time. You may resubmit your files as often as you like, but only the last submittal will be graded and will be used to determine if your project is late. For more information, see the projects page on the course website.
You can check to see what files you have submitted by typing:
submitls cs202 Proj4
See the Project Submission page for detailed instructions.
Remember — if you make any change to your program, no matter how insignificant it may seem, you should recompile and retest your program before submitting it. Even the smallest typo can cause compiler errors and a reduction in your grade.
Avoid unpleasant surprises!