import java.util.Scanner; public class Retangle{ Scanner input=new Scanner(System.in); public static void main(String args[]){ double length;//The rectangle's length double width;//The rectangle's width double area;//The rectangle's area Scanner input=new Scanner(System.in); length=getLenth();// get the rectangle's from the user width=getWidth();//get the rectangle's from the user area=getArea(length,width);//get the rectangle area displayData(length,width,area);//display the rectangle's area } public static double getLenth(){ double length=0.0; System.out.println("Please enter the length:"); length=input.nextDouble(); return length; } public static double getWidth(){ double width=0.0; System.out.println("\nPlease enter the Width:"); width=input.nextDouble(); return width; } public static double getArea(double length,double width){ return length*width; } public static void displayData(double length,double width,double area){ System.out.println("\nThe area is:"+area); } }