<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
public class Rectangle extends Shape {
	protected double width;
	protected double height;
	
	public Rectangle(double x, double y, double width, double height) {
		super(x,y);
		this.width  = width;
		this.height = height;
	}

	/** @see Shape.equals */
	public @Override boolean equals(Object other) {
		if (!(other instanceof Rectangle))
			return super.equals(other);

		Rectangle o = (Rectangle) other;
		return super.equals(o)
		    &amp;&amp; this.width == o.width &amp;&amp; this.height == o.height;
	}

	/** @see Shape.getArea */
	public @Override double getArea() {
		return this.width * this.height;
	}
}
</pre></body></html>