Java Chat Rooms
1. Basic Features
You are expected to implement a chat room using Java.
This project requires you to execute
multiple threads
and display multiple command-line interfaces, namely chat rooms.
Each chat room command-line interface should be able to send messages to all other command-line interfaces while receiving and displaying messages on the command-line interface.
The project should support the following features:
-
Multithreading Implementation (10 pts).
- Your program should be implemented based on Java multithreading techniques.
- Hence, your project should be able to display multiple command-line interfaces (i.e., chat rooms) concurrently in a single computer/workstation.
- Closing or starting a command-line interface should not affect the proper functioning of other command-line interfaces.
-
Chat Room Functions (10 pts)
- When creating a new chat room command-line interface, the user is able to input an ID via keyboard input, which will be displayed before each message the user sends.
- The user is able to send messages via keyboard input and view the messages of other users (which are sent by other command-line interfaces).
- The graphical user interface is NOT required since this is the first project for CSC1004.
- Message Display (10 pts):
- Your program can display the current time when a user enters the chat room.
- You program can display the current time when a user sends or receives a message.
- You program can display the number of messages that have been sent by a user when she/he talks.
2. Advanced Features
Note that you can earn 90% of the scores by finishing all three projects with the only basic features.
That is to say, to get a higher score, you may want to consider adding some advanced features:
(Please pick some features from the followings.
The corresponding bonus scores will be added to your final score,
and the upper bound of your final score is 100 pts.
That's to say, you can get at most 100 pts by picking two 5 pts features or one 10 pts feature.)
- Chat Record Storage (5 pts) : The user can save all the chat records to a local file so that a user can view all messages even before entering the chat room.
- Search Function (5 pts) : The user can search chat logs by keyword or username. Hint: you can specify a certain keyboard input pattern to start searching. For example, let "#search (keyword or username)" be the input pattern.
- Message Recall (5 pts) . The user can recall the message(s) that you have just sent to the chat room (i.e., delete messages from the chat room so that all users can no longer view that message). Hint: you can specify a certain keyboard input pattern to recall your message(s).
3. Submission
Submission should be made at the blackboard system. You need to submit:
- Video: Prepare a presentation for your project by recording a video. The video should record the screen while your code is running on your laptop or desktop.
- Code: Prepare your code for submission. The main functions and classes in the code must have comments in a reader-friendly format.
4. Resources