Help needed very simple java program

hi there,

i have recently started to learn java. and i have been given these simple java programs to get started with.

could and one give me any idea on how to solve these programs as they have blown my head away.

Write a program Wallcover_estimate.

This program must contain at least two methods (main and one or more other method(s)).

Write a method that calculates the wall area of a room. It should take three parameters – the width, length and height of a room. This method must then calculate the wall area and output the result to the screen.

The method should be called repeatedly from main until the user indicates that they wish to stop calculating room wall areas.

(Area of wall covering = (2*(length * height)) + (2* (width * height)).

if any one could solve and guide me through this. i would really appritiate any response and advise given.

thanks

simple java program, please help!!

this is the work which i have done so far.

thanks alot

// calculating area of wall covering of a room

import javax.swing.JOptionPane;

public class Room

{

// First Method, to find Area of room to be covered

public static void areaOfRoom(double lenght, double height, double width)

{

double area = 2 * (lenght * height) + 2 * (width * height);

if (lenght<0)

JOptionPane.showMessageDialog(null, "Lenght Can not be negative");

if (height<0)

JOptionPane.showMessageDialog(null, "Height Can not be negative");

if (width<0)

JOptionPane.showMessageDialog(null, "Width Can not be negative");

if (lenght>0)

if (height>0)

if (Width>0)

JOptionPane.showMessageDialog(null, "The Area of Rectangle is " + area);

}

// Main Method to input numbers from the user

public static void main(String[]args)

{

String input = JOptionPane.showInputDialog("Please Type in 1 to find the Area of Room");

int number = Integer.parseInt(input);

int count=0;

double l,h + w,h;

// This Section runs the areaOfRectangle Method

if (number==1)

{

input = JOptionPane.showInputDialog("Please Type in the Lenght of the Room");

l = Integer.parseInt(input);

input = JOptionPane.showInputDialog("Please Type in the Height of the Room");

h = Integer.parseInt(input);

input = JOptionPane.showInputDialog("Please Type in the Width of the Room");

W = Integer.parseInt(input);

areaOfRectangle 2 * (l, h) + 2 * (W, h);

else if (number<0) // Terminates the program

{

}

}

}