CS 898T Mobile and Wireless Networks - Program 2 - Name:_________________ Assigned: Monday, April 5, 2004 Early Bird Bonus: Friday, May 7, 2004 Due: Monday, May 17, 2004 (100 points + possible extra bonus) o Put your name and add some necessary comments into these code when necessary. These are a part of grading in this assignment. o Write one page document describing the programs you create and the user's guide. o Use the handin system to submit all code electronically. The submission ID is 2. 1. Write client and server programs that implement a messenger system. The client programs will run on a Java mobile phone simulator. The server program can run on a Linux or Windows platform. Your messenger should have at least following functions: (1) Create an account in the messenger system. (2) Sign in the messenger system. (3) Add/Remove a friend into the contact list. (4) Change your current status such as busy, away, online, and etc. (5) Chat with a friend. (6) Sign off (exit) the messenger system. A possible implementation is shown as below (Please also refer to Yahoo messenger, ICQ, MSN messenger): Once the client connects to the server, the server prompts the client for a sign-in or the account creation screen. After the successful login, it prints a confirmation message. The server should manage online messenger by supporting the following operations: add/remove a contact chat someone - chat to someone where someone is an alias of another user. status - set the status such away, busy, online, offline. who - show the contact list and their status. help - show the commands. o A user registers the messenger system with his nickname and password. The server will respond with the string: "Welcome Fred to the Messenger. o To add Jane and Tom into the contact list, a user named Fred would would client the add/remove a contact button and then enter Jane and Tom. If Jane and Tom are successfully added into the contact list, the messenger system will response some confirmation message. Next time, when Fred registers with the messenger system, Fred won't need to add Jane and Tom into the list. To remove Jerry from the contact list, Fred would click the remove button to remove Jerry. o To show who is in the contact list and their status, the contact list can be shown once Fred is logged into the system or Fred would click the who button to show the contact list. o To initiate a talk to Anne, a user named Fred would click the talk button and enter the name of Anne. A textbox or textfield would be used for sending the message. o A user can sign off the messenger system by clicking the exit button. The server can started on kirk as follows: java chatd where is the number of the port to which the server is bound. If the port number is not specified, the default port (your last 5 digital of SSN) is used. The client will start from the mobile phone. Hint: Please refer to UDPClient.java and UDPServer.java in the J2ME directory and other Java programs.