Create and complete the implementation of the
Your class should be public, not final and not abstract, inherit from the
and provide the following methods:
- Constructor that takes a
doubleparameter. Creates a new
Circlewith the passed radius. You can assume that the passed radius is greater than zero. You should call the
Shapeconstructor and pass it the
String"circle" to identify the type of this shape.
- Public instance method
areathat takes no arguments and returns a
double. Return the area of this shape:
Math.PI * radius * radius.
public boolean equals(Object other). Return
Circlewith the same radius, and
falseotherwise. Note that
nullor not a
Finally, note that your class should not expose any of its internal state publicly.