0
/ 50
For this problem you will use this class:
public class Rectangle { private int length; private int width; public void setLength(int len)...
For this problem you will use this class:
public class Rectangle
{
private int length;
private int width;
public void setLength(int len)
{
this.length = len;
}
public void setWidth(int w)
{
this.width = w;
}
public int calculateArea()
{
return this.length * this.width;
}
}
In the method below, you are given a Rectangle r
as a parameter. Using the methods above, calculate the area of the Rectangle r
and return that value multiplied by 2.
Your feedback will appear here when you check your answer.