logo

Designing a Chat Client Program

   

Added on  2019-09-23

3 Pages435 Words158 Views
 | 
 | 
 | 
Graded ExerciseExercise 3Design the world programclient. The programcommunicateswith achat serverand displays the conversation in this chat room.The program must be prepared to receive messages from the server. All messages from the server are plain strings. When such a string arrives, it is added as the most recent element to the conversation.The program also interacts with the user, who may edit one-line text fields:Its key handler accepts keyboard characters of length 1—except for"\r"(enter) and"\b"(del)—and adds them to the end of the text.When the user presses the so-called backspace (or delete) key, the program must erase the last 1String that was added (if any).When the user pressesenterakareturn("\r"), the program sends the current string in the text field to theserver and clears the text field.Feel free to equip your program with additional edit capabilities. Also, your program may display its state in any
Designing a Chat Client Program_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents