Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Rectangle;
- public class PerimeterTester {
- public static void main(String[] args) {
- Rectangle example = new Rectangle(23, 45, 23, 17);
- double width = example.getWidth();
- double height = example.getHeight();
- double perimeter = 2*width + 2*height;
- System.out.print(perimeter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment