I am currently trying to create a class that prints out a rectangle with a height and width 1. I have the program set up (there is a template we are supposed to use) and I incorporated all of the steps. However there is one problem with the return statement on the line "SimpleRectangle(){" it says it is missing a return statement but no matter what I return it still comes up with an error.
public static void main (String[] args){
SimpleRectangle rectangle1=new SimpleRectangle();
System.out.println("The area of radius "+rectangle1.perimeter+" is "+rectangle1.getArea());
}
double height;
double width;
SimpleRectangle(){
height=1;
width=1;
}
double getArea(){
return height*width;
}
double getPerimeter(){
return length+length+width+width;
}
}