Class Cube
public class Cube extends
RectangularParallelopiped{
// A constructor that calls its parent constructor:
Cube(double side) {
super
(side, side, side);
}
}
// Cube inherits the volume() method of its parent.