You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a Player class - an instance of this class with that can communicate with other Player(s) (other instances of this class)
The use case for this task is as bellow:
1. create 2 players
2. one of the players should send a message to second player (let's call this player "initiator")
3. when a player receives a message should send back a new message that contains the received message concatenated with the message counter that this player sent.
4. finalize the program (gracefully) after the initiator sent 10 messages and received back 10 messages (stop condition)
5. both players should run in the same java process
6. document for every class the responsibilities it has.
7. opposite to 5: have every player in a separate JAVA process (different PID).