Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is in java 20. Write a program that creates a Socket connection to a program running on the instructor's computer to retrieve the answer
This is in java
20. Write a program that creates a Socket connection to a program running on the instructor's computer to retrieve the answer to this question! Create a connection to the instructor's computer on port 1111(The network address is the same as when you connected to take the exam and is showing at the top of the instructor's exam GUI at the front of the room). Use DataOutputStream and DatalnputStream to send and receive TEXT (String) messages (as we did when we wrote sample communications programs in lecture 3) Send your name (EXACTLY as you entered it to take the exam). Then receive a message. (Note: send one message, receive one message.) Do not close the connection - the instructor's server will do that. The received message is either the answer to this question or an error message. (One word of caution: do not create the dos and dis in ADJACENT statements. This used to cause a hang in previous releases of Java.) If you receive an answer (a number in String form) from the instructor, print it on your 20. Write a program that creates a Socket connection to a program running on the instructor's computer to retrieve the answer to this question! Create a connection to the instructor's computer on port 1111(The network address is the same as when you connected to take the exam and is showing at the top of the instructor's exam GUI at the front of the room). Use DataOutputStream and DatalnputStream to send and receive TEXT (String) messages (as we did when we wrote sample communications programs in lecture 3) Send your name (EXACTLY as you entered it to take the exam). Then receive a message. (Note: send one message, receive one message.) Do not close the connection - the instructor's server will do that. The received message is either the answer to this question or an error message. (One word of caution: do not create the dos and dis in ADJACENT statements. This used to cause a hang in previous releases of Java.) If you receive an answer (a number in String form) from the instructor, print it on yourStep 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