public abstract class Shape {
public abstract double area();
}
public abstract class Polygon extends Shape {
public int sides() { return 0; }
}What is true?
- A
Polygon must implement area()
- Bcheck_circle
Polygon compiles; it remains abstract because area() is unimplemented
- C
Polygon cannot be abstract
- D
Compile-time error: Polygon cannot extend Shape
Explanation
An abstract subclass need not implement abstract methods; concrete descendants will.