Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Rectangle;
- public class AreaTester
- {
- public static void main(String[] args)
- {
- Rectangle rect = new Rectangle(51, 1);
- double area = rect.getWidth() * rect.getHeight();
- System.out.println(area);
- System.out.println("Expected: 51");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment