Design and implement an email application using RMI.
 Provide an API for the systemâs codebase.
You have been asked to design and develop an email application that will allow users to set up an account with the system, log in and retrieve their emails as well as sending emails to other users of the system. Users should also be able to log out of the system, which should close down the client program. The email application must employ Javaâs version of distributed objects â RMI. Your email and user data must be maintained in data structures within your program for the duration of its execution, not externally (i.e. no database / file storage while it is running. You may store this data in a database or file prior to the applicationâs termination and read it in when the application starts up, but you may not use external storage other than this) The email application will need to cater for the following fundamental application requirements:
Setting up/Registering an account with the system and retaining user log in details on the server.
 Logging in to the system (this should automatically display the userâs new received emails, if there are any).
The email application will need to cater for the following fundamental mailing requirements:Â Sending an email to one (or more) users of the system.
 Retrieving all new (unread) emails sent to the current user (if an email is received while the user is logged in, the client should be alerted that there are new mails AUTOMATICALLY)
Â
Retrieving all email sent by the current user
 Retrieving all emails marked as spam for the current user
 Searching for a specific email sent by / to the current user
 Deleting a specific email sent by / to the current user
 Moving a specific email belonging to the current user into spam
 Deleting all spam email belonging to the current user
For this assignment you will need to provide:
 Client Interface 20%
 JavaDoc API 20%
Â
 Application Design and Implementation 60%
You must design & develop a suitable interface for your client program. This should be a DOS command-line interface
Â
(Marks â 20%)
Concurrent & Distributed Programming DKIT
As you are implementing this in RMI, you will be creating methods to provide each of your applicationâs functions. You are required to provide API documentation for all classes within your application, particularly the methods providing application functionality. You should indicate what each method or class is used for. For classes, you should indicate the meaning of any fields. For methods, you should explain the meaning of its parameters and return values, as well as any exceptions that may be thrown. This API (a set of HTML files) should be provided in the project. JavaDocs without any content will not gain marks.
(Marks â 20%)
Application Design and Implementation
You will need to consider:
 The functionality of the server:
o How is the server going to store users?
o How are you going to store the emails (if this is necessary)?
o How will your server handle interaction with multiple clients?
o Mutual exclusion will need to be considered if a common data object is being accessed concurrently by multiple clients (i.e. co-ordinate access to a shared resource).
 The functionality of the client:
o How is a client going to display information to the user?
o How is the client going to send and receive emails?
 What information will you need to exchange between the client and the server?
 Appropriate validation and error handling.
(Marks â 60%)
1) The source code must be submitted as a pair of projects from Netbeans. Failure to submit projects that can be opened with Netbeans will result in a loss of marks.
2) Documentation folder containing your generated JavaDocs.
3) All projects and documentation must be submitted in a single (zip format) file.
4) Assignments should be submitted through Moodle.