java

所属分类:Java编程
开发工具:Java
文件大小:4KB
下载次数:4
上传日期:2011-11-15 15:37:42
上 传 者rainpgy
说明:  修改实验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.)

文件列表:
实验3.doc (35328, 2011-11-15)

近期下载者

相关文件


收藏者