Guest_imported
New member
- Jan 1, 1970
- 0
i hava a program that need some help i need to get it to compute and output the area of the perimetrer of a rectangle here is what i have
public class Main
{
private int length;
private int width;
public Rectangle()
{
length = 1;
width = 1;
}
public Rectangle(int l, int w)
{
length = l;
width = w;
}
public void print_info()
{
System.out.println("length = " + length);
System.out.println("width = " + width);
}
public int get_length()
{
return length;
}
public int get_width()
{
return width;
}
}
public class Main
{
private int length;
private int width;
public Rectangle()
{
length = 1;
width = 1;
}
public Rectangle(int l, int w)
{
length = l;
width = w;
}
public void print_info()
{
System.out.println("length = " + length);
System.out.println("width = " + width);
}
public int get_length()
{
return length;
}
public int get_width()
{
return width;
}
}