首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 编写一个线段类 MyLine,要求如下: 主要属性有: x ,y ;类型为Point (查看API) 编写构造方法,如 MyLine(Point p1...

编写一个线段类 MyLine,要求如下: 主要属性有: x ,y ;类型为Point (查看API) 编写构造方法,如 MyLine(Point p1...

  • 资源大小:1.99 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: Java Develop java

资 源 简 介

编写一个线段类 MyLine,要求如下: 主要属性有: x ,y ;类型为Point (查看API) 编写构造方法,如 MyLine(Point p1 , Point p2) 编写5个成员方法。如: 检查线段是否位于第一象限check()… 求线段的长度 length() … 判断两条直线是否相交(另一线段作为参数)。 编写一点到该线段(或延长线)的距离 其他方法。 注:编写方法时,考虑利用Point类的方法 编写测试程序-Write a segment class MyLine, requirements are as follows: The main attributes are: x, y type Point (see API) the preparation of construction methods, such as MyLine (Point p1, Point p2) prepared by five members of the method. Such as: Check whether the line segment in the first quadrant check () ... order to segment the length of the length () ... to determine whether the two straight lines intersect (the other segment as a parameter). The preparation of 1:00 to the line segment (or extension) of the distance from other methods. Note: The preparation method, consider using the Point class approach to preparing test program

文 件 列 表

test.java
Myline.class
test.class
VIP VIP
  • 睥睨 6小时前 成为了本站会员

  • ? 8小时前 成为了本站会员

  • IATWAY 1天前 成为了本站会员

  • 大智若愚 1天前 成为了本站会员

  • Mason 1天前 成为了本站会员

  • 1天前 成为了本站会员

  • Half_Punch 2天前 成为了本站会员

  • liqing71718 2天前 成为了本站会员

  • 伟国 2天前 成为了本站会员

  • songy 2天前 成为了本站会员

0.185216s