Associate
I can't seem to get this code to work:
It keeps saying:
incompatible types; found : java.lang.string, required; double at line 55, column 19 (The line were " itsHeight = readString("Enter the height of the rectangle");" is)
Code:
public void areaRectangle()
{
double area;
double itsHeight;
double itsWidth;
System.out.println("Okay, so you want to calculate a Rectangle");
itsHeight = readString("Enter the height of the rectangle");
itsWidth = readString("Enter the width of the rectangle");
area = itsWidth * itsHeight;
System.out.println("The area of the rectangle is:" + area);
}
It keeps saying:
incompatible types; found : java.lang.string, required; double at line 55, column 19 (The line were " itsHeight = readString("Enter the height of the rectangle");" is)