java
代码说明:
修改实验7中定义的Rectangle类,使之拥有两个构造方法。其中一个是默认的,它使两点的坐标都为(0,0) 另一个带有4个参数,求出左上角和右下角点坐标为(2.1,3.2)、(5.2,6.3)的矩形的周长及面积,再利用带参数的构造方法创建Rectangle对象,求出左上角和右下角点坐标为(1,2)、(6.8,10.5)的矩形的周长及面积.(Modify the definition of experiment 7 Rectangle class, so that it has two constructors. One is the default, it makes two points of the coordinate of (0,0) the other with four parameters, find the upper left and lower right corner coordinates (2.1,3.2), (5.2,6.3) and perimeter and area of a rectangle, and then use a parameterized constructor method to create a Rectangle object, find the upper left and lower right corner coordinates (1,2), (6.8,10.5) rectangle of perimeter and area.)
下载说明:请别用迅雷下载,失败请重下,重下不扣分!