001 package classwork;
002 import java.awt.*;
003
004 /**
005 * Tests the Rectangle class by constructing a Rectangle and then computing its area.
006 * @author Tom James
007 *
008 */
009 public class RectangleTest {
010 /**
011 * @param args
012 */
013 public static void main(String[] args) {
014 Rectangle box = new Rectangle(5,10,160,20);
015 double x,y,area;
016 x = box.getWidth();
017 y = box.getHeight();
018 area = x*y;
019 System.out.println("Area is:" + area);
020 }
021
022 }