How do i fix this to make it run ???
class Main {
public static void main(String[] args) {
// Length and sides.
Cube shape1 = new Cube(5, 6);
HalfSquare shape3 = new HalfSquare(4, 20, 4, 5);
// Cluster of print statements to deliver stats about the shape.
// Shape 1
System.out.println(shape1.toString());
System.out.println("");
System.out.println(shape1.toStringCube());
System.out.println("");
// Shape 2
System.out.println("");
System.out.println(shape3.toString());
System.out.println("");
System.out.println(shape3.toStringHalfSquare());
}
}
// Main Class
class Shapes {
private int sidesNum;
// Constructors, Mutators, and Accessors
public Shapes(int SN){
setSidesNum(SN);
}
public void setSidesNum(int value){
this.sidesNum = value;
return;
}
public int sideNumber(){
return this.sidesNum;
}
// shapes, shapes, and more shapes
public String toString() {
return " This shape has: " + sideNumber() + " sides.";
}
}
class Cube extends Shapes{
private int volume;
// Constructors, Mutators, and Accessors
public Cube(int Vol, int SN){
super(SN);
setVolume(Vol);
}
public void setVolume(int value){
this.volume = value;
return;
}
public int getVolume(){
return this.volume;
}
public String toStringCube() {
return " " + "Volume of a cube = " + Math.pow(getVolume(), 3 ) + " squared. Surface area = " + Math.pow(getVolume(), 2) * sideNumber() + " units2.";
}
}
class HalfSquare extends Shapes{
private int length;
private int width;
private int height;
// Constructors, Mutators, and Accessors
public HalfSquare(int lngh, int hght, int wdt, int SN){
super(SN);
setLength(lngh);
setHeight(hght);
setWidth(wdt);
}
public void setLength(int value5){
this.length = value5;
return;
}
public void setWidth(int value6){
this.width = value6;
return;
}
public void setHeight(int value7){
this.height = value7;
return;
}
public int getLength(){
return this.length;
}
public int getWidth(){
return this.width;
}
public int getHeight(){
return this.height;
}
public String toStringhalfSquare() {
double hypot = (Math.sqrt((getLength() * getLength()) + (getHeight() * getHeight())));
return "The volume of a prism = " + (getLength() * getWidth() * getHeight()) * .5 + " squared. The hypotenuse = " + hypot + ", The surface area =" + ((getLength() * getHeight()) + (hypot * getWidth()) + getHeight() * getWidth() ) + " units2";
}
}