Constructor and Description |
---|
Shape()
Construct a generic instance of unknown shape type.
|
Shape(java.lang.String name)
Construct a Shape whose name is specified in the argument.
|
Modifier and Type | Method and Description |
---|---|
abstract double |
getPerimeter()
Get the perimeter of this Shape, but doesn't know how to compute it, hence abstract.
|
java.lang.String |
getShapeName()
Get the name of this kind of shape.
|
abstract double |
getSurfaceArea()
Get the surface area of this Shape, but doesn't know how to compute it, hence abstract.
|
public Shape()
public Shape(java.lang.String name)
name
- the name of this kind of shapepublic java.lang.String getShapeName()
public abstract double getSurfaceArea()
public abstract double getPerimeter()