Write a program to compute perimeter of class Circle, Rectangle, Square using pameterised constructor using command line argument

Write a program to compute perimeter of class Circle, Rectangle, Square using pameterised constructor using command line argument

import java.io.*;
class compute{
compute(int a,int b,int c,int d)
{
int p=a+b+c+d;
System.out.println("the perimeter of quadrilateral is"+p);       //quadrilateral
}
compute(int a,int b)
{
int p=2*(a+b);         //rectangle
System.out.println("the perimeter of rectangle is"+p);
}
compute(int a)
{
int p=4*a;
System.out.println("the perimeter of square is"+p);      //square
}
compute(float r)
{
double p=2*3.14*r;
System.out.println("the perimeter of circle is"+p);     //circle
}
}
class peri{
public static void main(String args[])
{
int r1=Integer.parseInt(args[0]);
compute ob2=new compute(r1);
float r2=Float.parseFloat(args[0]);
compute ob1=new compute(r2);
int r3=Integer.parseInt(args[0]);
int r4=Integer.parseInt(args[1]);
compute ob3=new compute(r3,r4);
int r5=Integer.parseInt(args[0]);
int r6=Integer.parseInt(args[1]);
int r7=Integer.parseInt(args[2]);
int r8=Integer.parseInt(args[3]);
compute ob4=new compute(r5,r6,r7,r8);
}
}