1.

public abstract class Shape {_x005F_x000D_ private int x;_x005F_x000D_ private int y;_x005F_x000D_ public abstract void draw();_x005F_x000D_ public void setAnchor(int x, int y) {_x005F_x000D_ this.x = x;_x005F_x000D_ this.y = y;_x005F_x000D_ }_x005F_x000D_ }_x005F_x000D_ Which two classes use the Shape class correctly?

A. public class Circle implements Shape { private int radius;
B. public abstract class Circle extends Shape { private int radius; }
C. public class Circle extends Shape { private int radius; public void draw();
D. None
Answer» C. public class Circle extends Shape { private int radius; public void draw();


Discussion

No Comment Found