Write a program that accepts the radius of a circle in the client side of a program and compute the area and perimeter in the server side program

Write a program that accepts the radius of a circle in the client side of a program and compute the area and perimeter in the server side program and return the values to the client program.

// Client   import java.io.*; import java.net.*;  public class Client {             public static void main(String[] args) throws IOException{                 Socket s = new Socket("localhost",1234);                 BufferedReader br;                 PrintStream ps;   String str;                System.out.println("Enter Radius  :");                 br=new BufferedReader(new InputStreamReader(System.in));    ps=new PrintStream(s.getOutputStream());                ps.println(br.readLine());    br=new BufferedReader(new InputStreamReader(s.getInputStream()));                str=br.readLine();                System.out.println("Area of the circle is : "+str);                 br.close();                 ps.close();            } } 
// Server  import java.io.*; import java.net.*;  class Server {       public static void main(String[] args){           try {           ServerSocket ss = new ServerSocket(1234);                  System.out.println("Waiting for Client Request");                   Socket s=ss.accept();                   BufferedReader br;                   PrintStream ps;                   String str;                   br=new BufferedReader(new InputStreamReader(s.getInputStream()));                   str=br.readLine();                   double r=Double.parseDouble(str);                   double area=3.14*r*r;                   ps=new PrintStream(s.getOutputStream());                   ps.println(String.valueOf(area));                   br.close();                   ps.close();                   s.close();                   ss.close();        }           catch(Exception e)           {                       System.out.println(e);           }  } }  

how to add perimeter of a circle