b’9b9e196bf2a16a4a98d610c172cb3430dd8105′
blob 566�package programmingexample5;
import java.awt.Color;
public class Rectangle extends Shape implements ShapeVisitable {
private int length, width;
public Rectangle(int length, int width, Color colour) {
super(colour);
this.length = length;
this.width = width;
}
@Override
public double area() {
return length * width;
}
@Override
public void accept(ShapeVisitor v) {
/*
* TODO You need to implement this method, to answer the question.
*/
v.visit(this);
}
}