I got project description and code that is not doing things that said in programm description.I need you to rewrite my code making it match with description-->import java.io.*;
import java.net.*;
import java.util.concurrent.*;

public class TCPPacketServer {
    private static int port = 1024;
    private static ExecutorService pool = Executors.newFixedThreadPool(10);

    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(port);

            while (true) {
                Socket clientSocket = serverSocket.accept();
                pool.execute(new ClientHandler(clientSocket));
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private static class ClientHandler implements Runnable {
        private Socket clientSocket;

        public ClientHandler(Socket socket) {
            this.clientSocket = socket;
        }

        public void run() {
            try {
                BufferedReader br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
                PrintStream ps = new PrintStream(clientSocket.getOutputStream());

                String line;
                while ((line = br.readLine()) != null && !line.equals("CLOSE")) {
                    byte[] buffer = new byte[1024];
                    int bytesRead = clientSocket.getInputStream().read(buffer);

                    if (bytesRead > 0) {
                        ByteArrayInputStream bais = new ByteArrayInputStream(buffer, 0, bytesRead);
                        ObjectInputStream ois = new ObjectInputStream(bais);
                        Packet packet = (Packet) ois.readObject();
                        System.out.println("FROM CLIENT " + clientSocket.getRemoteSocketAddress() + ": Packet SerialNo#" + packet.getSerialNo() + " is received");

                        Packet responsePacket = new Packet(packet.getSerialNo(), "ACK");
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        ObjectOutputStream oos = new ObjectOutputStream(baos);
                        oos.writeObject(responsePacket);

                        byte[] responseBuffer = baos.toByteArray();
                        ps.write(responseBuffer);
                    }
                }

                ps.close();
                br.close();
                clientSocket.close();
            } catch (IOException | ClassNotFoundException e) {
                e.printStackTrace();
            }
        }
    }
}
import java.io.*;
import java.net.*;

public class TCPPacketClient {
    private static String[] output = {"--Enter the data packet: "};

    public static void main(String[] args) {
        try {
            Socket socket = new Socket("localhost", 1024);

            BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            PrintStream ps = new PrintStream(socket.getOutputStream());

            BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
            String line = "";
            while (!line.equals("CLOSE")) {
                System.out.print(output[0]);
                line = input.readLine();

                int serialNo = 1; // hardcoded for simplicity
                Packet packet = new Packet(serialNo, line);
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                ObjectOutputStream oos = new ObjectOutputStream(baos);
                oos.writeObject(packet);

                byte[] buffer = baos.toByteArray();
                ps.write(buffer);

                InputStream is = socket.getInputStream();
                byte[] responseBuffer = new byte[1024];
                int bytesRead = is.read(responseBuffer);

                if (bytesRead > 0) {
                    ByteArrayInputStream bais = new ByteArrayInputStream(responseBuffer, 0, bytesRead);
                    ObjectInputStream ois = new ObjectInputStream(bais);
                    Packet responsePacket = (Packet) ois.readObject();
                    System.out.println("FROM SERVER: Packet SerialNo#" + responsePacket.getSerialNo() + " is received");
                }
            }

            ps.close();
            br.close();
            socket.close();
        } catch (IOException | ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
import java.io.Serializable;

public class Packet implements Serializable {
    private int serialNo;
    private String data;

    public Packet(int serialNo, String data) {
        this.serialNo = serialNo;
        this.data = data;
    }

    public String getData() {
        return data;
    }

    public int getSerialNo() {
        return serialNo;
    }
}
import java.io.*;
import java.net.*;

public class MTServer {
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(8080);
            System.out.println("--Waiting for client request. New clients pop up!--");

            while (true) {
                Socket socket = serverSocket.accept();
                System.out.println("Server: Hello");

                BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                PrintStream ps = new PrintStream(socket.getOutputStream());

                ps.println("Hello");
                String response = br.readLine();
                System.out.println("Clients: " + response);

                ps.println("How are you?");
                response = br.readLine();
                System.out.println("Clients: " + response);

                ps.close();
                br.close();
                socket.close();
                System.out.println("Server: Connection closed");
            }
        } catch (IOException e) {
            System.err.println(e);
        }
    }
}
import java.io.*;
import java.net.*;

public class Clients {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("localhost", 1024);
            System.out.println("--Request sent successfully--");

            BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            PrintStream ps = new PrintStream(socket.getOutputStream());

            BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
            String line = "";
            while (!line.equals("CLOSE")) {
                System.out.print("Server: ");
                line = input.readLine();
                ps.println(line);

                String response = br.readLine();
                System.out.println("Clients: " + response);
            }

            ps.close();
            br.close();
            socket.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
}
---Here is description-->Thisisaclient/servimplementfortransmitpacket.Eachpacketconsistoftwopart;theheaderpartcontainonlithe“serialnumber”andthe“datapart”containamessag(anistringofcharact).``Client''sendapackettotheserverandreceivitacknowledg,thenenteratextandmtserverconvertitintouppercasletterandreturnitback.Whenaclientsenda“CLOSE”messagin``Client''class,both``Client''and``mtserver''termin.Compilallthreefile.Runserverandclientfileintwodifferwindow.1.tcppacketserver.java●Use/**Thegetoutputstream()methodtosendoutthedatathroughthesocketstream**/●Use/**Thegetinputstream()methodtoobtainahandltothesocketstream**/2.tcppacketclient.java●Use/**theinstancofSocketclassusetheaddressofthiscomputandtheportnumber1024**/●Tolearnyourhostnameusecommandbelow:a.>ipconfig/all(Window+R)●Use/**Thegetinputstream()methodtoobtainahandltothesocketstream**/●Use/**Thegetoutputstream()methodtosendoutthedatathroughthesocketstream**/●Usebufferedreadmethod/**toreadfromthekeyboardthedata(Packet)thatneedtobesendtotheserver**/●/**CreatanewinstancofPacketclasswithdataheader,thedata(packet)andpacketnumber**/3.packet.java●privatintserialno;●privatStringdata;publicStringgetdata(){returndata;}publicintgetserialno(){returnserialno;}Step-1:Compiltcppacketserv–Openport…--Step-2:Compiltcppacketcli--Enterthedatapacket:--Step-3:Entercommandtothedatapacket:tcppacketserv--Openport…ReceivFromClientPacketserialno#1andpacketDataisTHISISCLIENT1–tcppacketcli--Enterthedatapacket:thisisClient1FROMSERVER:Packetserialno#1isreceived—Part-2InthispartyouwillcreataClientandServerconnect.Aclientapplicgeneratasocketonitendoftheconnectandattempttoconnectthatsockettoaserver.Whentheconnectisestablish,theserverconstructasocketobjectonitendofthecommunic.Theclientandservercannowcommunicbywritetoandreadfromthesocketusethejava.netpackag.Use(Mandatori):●printstreamps=newprintstream(socket.getoutputstream());”tosendamessagtoClientfromServer.Use(Mandatori):●bufferedreadbr=newbufferedread(newinputstreamread(socket.getinputstream()));toreceivthemessagfrom``Client''Step-1:Compilserve.javaclass--WaitforclientrequestNewclientpopup!Server:--Step-2:Compilclient.javaclass--Requestsentsuccess--Step-3:Clientandmtserverconnectmtserver--WaitforclientrequestNewclientpopup!Server:HelloClient:HiServer:Howareyou?Client:Iamfine—Client--RequestsentsuccessServer:HelloClient:HiServer:Howareyou?Client:Iamfine--YoucantseeUMLdiagramsoIwriteithere-->classPocket:-data:String-serialno:int+Packet(serialno:int,data:String)+getdata():String+getserialno():intPacketclasshavetousejava.io.serializ<<util>>tcppacketservmain(argv:String[]):void<<util>>mtservermain(argLString[]):void<<util>>Clientmain(arg:String[]):void<<util>>tcppacketcli-output:String[]-host:inetaddress+main(argv:String[]):voidTherehavetobe5classnametcppacketservmtserverClienttcppacketcliPocketclass