下のRectクラスはPointクラス利用して定義されているが、継承機能は利用されていない。Rectクラスの定義を修正し、継承機能を利用できるように書き直せ。具体的には、RectクラスからupperLeftフィールドを削除し、代わりにPointクラスを継承するようにすればよい。

/* Point.java に保存
 */
public class Point {
public int x, y;
public Point(int x0, int y0){
x = x0;
y = y0;
}
}

/* Rect.javaに保存
*/
public Point upperLeft; //左上隅の座標
public int width;
public int height;