|
|
|
|
|
|
|
|
|
|
public
abstract class Polyhedron {
|
|
|
protected int nFaces, nVertices, nEdges;
|
|
protected double width, length, height;
|
|
|
public void describe() {
|
|
|
System.out.println("This
polyhedron has "
|
|
+ nFaces + " faces, " +
nVertices +
|
|
" vertices, and " + nEdges
+ " edges. Its volume is "
|
+ volume());
|
|
|
}
|
|
public abstract double volume();
|
|
}
|
|