Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Calculating area of rectangle and a square

I need help writing an if else statement.
  My task is to write a program that calculates the area of the following figures:
  • a square with sides of 0.666666667 meters
  • a rectangle of sides 1/9 and 4 meters
  Test the results for equality (use an if...else statement and output an appropriate message).

Starter code:
  1. public class IfTest1
  2. {
  3.      public static void main(String[] args)
  4.      {
  5.         // your code goes here
  6.      }
  7. }
  This may seem simple, but I'm a Java newbie. Please help!
No votes yet
Share this
0 answers