// // // P.615 // Rectangle.java // public class Rectangle implements Measurable { // instance var private double myWidth; private double myHeight; // constructor public Rectangle(double width, double height) { myWidth = width; myHeight = height; } // methods public double getPerimeter() { return 2 * (myWidth + myHeight); } public double getArea() { return myWidth * myHeight; } }