##
Re: geometry calculator

Code:

case 2:
System.out.println("You Entered, 2. Calculate the **Area of a Rectangle**");
System.out.print("Enter the **Length of the circle** ==> ");
System.out.print("Enter the **Width of the circle** ==> ");
float r = Float.parseFloat( sc.nextLine() );
System.out.println( "The area is " + Geometry.**areaRectangle( r )** );
case 3:
System.out.println("You Entered, 3. Calculate the** Area of a Triangle**");
System.out.print("Enter the **radius of the circle** ==> ");
float t = Float.parseFloat( sc.nextLine() );
System.out.println( "The area is " + Geometry.**areaTriangle( t ) **);

Check my bolding - are you serious?

No wonder you're confused - you'll confuse the users as well as yourself with prompts like that!

Remember, a rectangle has a length and a width. You need both to calculate its area. A triangle has a base and a height, you need both to calculate its area.

*The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time...*

T. Cargill

Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the *full* error message and stack trace, if present.