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
defined above, set its length to 10 and its width to 4.
Your feedback will appear here when you check your answer.