文件名称:point2Dand3D
- 所属分类:
- JSP源码/Java
- 资源属性:
- 上传时间:
- 2017-10-24
- 文件大小:
- 10kb
- 下载次数:
- 0次
- 提 供 者:
- 地球上****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
已知二维空间点Point2D类的定义如下,在此基础上派生出三维空间点Point3D类。根据数学,增加成员变量z,定义三个参数的构造方法和无参数的构造方法(对应原点的对象),重写toString()和getDistance()方法,重写equals()方法。TestPoint类的main()方法定义3个以上点做测试,结果格式如下所示。(The definition of Point2D class of two dimensional space points is as follows. On this basis, the Point3D class of 3D space point is derived. According to mathematics, we increase the membership variable Z, define the construction method of three parameters and the construction method without parameter (the object corresponding to the origin), rewrite the toString () and getDistance () methods, and rewrite the equals () method. The TestPoint (main) method of class defines more than 3 points for testing, and the result format is as follows.)
(系统自动生成,下载前可以参看下载内容)