Java定义一个Rectangle类

日期:2017-10-12 07:31:15 人气:1

Java定义一个Rectangle类

class Rectangle { private double width; private double height; public Rectangle(double width, double height) { this.width = width; this.height = height; } public double getC() { return (width + height) * 2; } public double getS() { return width * heig
    A+
热门评论