// Variation of Point that keeps track of how many times each point has been // translated and that provides a getTranslateCount method. import java.awt.*; public class MyPoint extends Point { private int count; public MyPoint() { this(0, 0); } public MyPoint(int x, int y) { super(x, y); } public void translate(int dx, int dy) { count++; super.translate(dx, dy); } public int getTranslateCount() { return count; } }