Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In java please Server Part: 1. Create a PrintServer.java Class Hint: two useful packages that you can import to your code: i. java.io, ii. java.net
In java please
Server Part: 1. Create a PrintServer.java Class Hint: two useful packages that you can import to your code: i. java.io, ii. java.net Two private member, int Port, and int MaxConnections which is the max number of clients that can connect to the server Listen for socket connection requests - server Accept a client's connection Send and receive message from each client (Bi-direction or duplex) 2. 3. 4. 5. Client Part: 1, Based on three classes from lab1: a. Client.java b. PrintClient.java c. ClientTest.java Hint: three useful packages that you can import to your code i. java.io, java.net, ii. javautil 2. One private member in PrintClient class: String host 3. A new constructor of PrintCli class to initiate the host, and the parent's variable: the port 4. Connect to server 5. Handle connections by sending and receiving messages Server Part: 1. Create a PrintServer.java Class Hint: two useful packages that you can import to your code: i. java.io, ii. java.net Two private member, int Port, and int MaxConnections which is the max number of clients that can connect to the server Listen for socket connection requests - server Accept a client's connection Send and receive message from each client (Bi-direction or duplex) 2. 3. 4. 5. Client Part: 1, Based on three classes from lab1: a. Client.java b. PrintClient.java c. ClientTest.java Hint: three useful packages that you can import to your code i. java.io, java.net, ii. javautil 2. One private member in PrintClient class: String host 3. A new constructor of PrintCli class to initiate the host, and the parent's variable: the port 4. Connect to server 5. Handle connections by sending and receiving messagesStep 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