Question
Write a java program to create the following: Create a GUI for the member to input their ID, IP address, and port. Create a unique
Write a java program to create the following:
Create a GUI for the member to input their ID, IP address, and port.
Create a unique ID for each member using a unique identifier generator such as UUID.
Create a server that will listen to incoming connections from members.
When a new member joins, the server will check if it is the first member. If it is, the member will be informed and become the coordinator. If not, the member will request details of existing members from the server and receive everyone's IDs, IP addresses, and ports, including the current group coordinator.
The new member will then contact everyone through the server to let them know that they can update their set of members to include the new member.
If some members do not respond, the new member will inform the server, and the server will inform other members to update their local list of existing members.
If the coordinator does not respond, any new member will become the coordinator. The coordinator will maintain the state of group members by checking periodically how many of them are not responding and inform active members about it so they can update their state of members.
Implement a messaging system for members to send private or broadcast messages to every other member through the server.
Print out messages sent to and by the members.
Allow the program to run either automatically or manually. In the former case, simulate the task automatically without accepting any input parameters from users. In the latter case, the program will require user input to simulate the task.
Implement a Quit button in the GUI to allow members to quit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started