Hi am working on a shape inheritance hierarchy and am having trouble with this particular class I have two errors that state class, interface, or enum expected: on the lines indicated in red everything else seems fine I have attached the whole project If you need to check out other parts to it. Here is my code for this particular class
// Exerciae 10.9: SphereShape.java
// Sphere Shape class extends ThreeDimensionalShape.
public class SphereShape extends ThreeDimensionalShape
{
private double radius; // sphere radius
// constructor
public SphereShape(double radius )
{
super("SphereShape");
this.radius = radius;
double volume = ( 4.0 / 3.0 ) * Math.PI * Math.pow( radius, 3 );
} // end method sphereVolume
} // end constructor
// return String representation of Sphere object
public String toString()
{
return String.format( "This is a sphere. It's radius = %f. It's volume = %f\n", radius, volume);
} // end method toString
} // end class SphereShape