Distributed Message Center
You are to build a distributed messaging system using Java RMI.
The system should allow registered users to leave messages for
other users and allow registered users to check their messages. In
addition to checking and leaving messages, the message center
must have a facility to register users and show all registered users.
Task
Your message center should support the following distributed
methods.
1. register (username, password) — this method should register a new user. If the user
name is already in use, print an error at the client asking the user to select a different
user name.
2. showusers — this method should display the user name of all registered users.
3. checkmessages (username, password) — this method should print each message that
was left for the user. The output should include the user who left the message, the date
and time the message was left, and the body of the message itself. This method should
report failed logins. This method should also report if there are no messages for a user.
4. leavemessage (username, reciever_name, message_text) — this method should leave a
message for the receiver made by the input username. The message text should be stored
for the message. The system should also store the date and time the message was left.
These methods should be executable from a simple console menu.
Submission
You are expected to design classes in an object-oriented manner
using good programming practices.
Your code must be written using Java coding conventions. Your
code must be well documented and contain a README &le with
instructions on compiling and running each program.
Turn in all les necessary to run the Distributed Message Center.
Go to top of question.
Student Submissions for question 1:
评论8