Graded Exercise.

Added on -2019-09-23

| 3 pages
| 435 words
| 158 views

Trusted by 2+ million users,
1000+ happy students everyday

Showing pages 1 to 1 of 3 pages

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

Found this document preview useful?

You are reading a preview
Upload your documents to download
or
Become a Desklib member to get accesss

Students who viewed this