登录
首页 » Java » 2008010

2008010

于 2009-12-24 发布 文件大小:2KB
0 180
下载积分: 1 下载次数: 25

代码说明:

  编写一个线段类 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)

文件列表:

Myline.class
test.class
test.java

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • note
    很实用的笔记编辑,查看器。你编辑的文本文件可以直接转化成HTML形式(Very practical note - editing, viewer. The text file you edit can be directly transformed into HTML form.)
    2018-06-22 21:15:04下载
    积分:1
  • AccountSetupOptionsTests
    Tests of basic UI logic in the AccountSetupOptions screen for Andriod.
    2013-10-06 00:29:52下载
    积分:1
  • JNAChina
    这是一个介绍jna的pdf,对初学者可能会有帮助(This is a description jna the pdf, may be helpful for beginners)
    2010-08-13 10:21:45下载
    积分:1
  • RationalRoseWangShangXuanKe
    网上选课系统的uml设计,使用Java语言通过三层模型实现:数据核心层,业务逻辑层和接入层。(Uml design online course selection system, the use of the Java language to achieve through the three-tier model: Data core layer, business logic layer and access layer.)
    2014-10-13 10:15:46下载
    积分:1
  • WebSpider_src
    一系列实验参考资料,希望对大家有点参考价值.是用JAVA编写的(series of experiments reference, in the hope that right we are a bit reference value. Java is used to prepare the)
    2007-03-27 23:56:08下载
    积分:1
  • Javawebservicesoap
    Java调用获取手机归属地服务SOAP1.2方式(Java call services for mobile phone ownership way SOAP1.2)
    2013-07-25 08:32:37下载
    积分:1
  • Mypicture
    定义4个类,MyShape、MyLine、MyRectangle和MyOval,其中MyShape是其他三个类的父类。MyShape为抽象类,包括图形位置的四个坐标;一个无参的构造方法,将所有的坐标设置为0;一个带参的构造函数,将所有的坐标设置为相应值;每个坐标的设置和读取方法;abstract void draw(Graphics g)方法。MyLine类负责画直线,实现父类的draw方法;MyRectangle负责画矩形,实现父类的draw方法;MyOval负责画椭圆,实现父类的draw方法。编写一个应用程序,使用上面定义的类,随机选取位置和形状,绘制20个图形。(Defines four classes, MyShape, MyLine, MyRectangle and MyOval, which MyShape the other three parent class. MyShape is an abstract class, including graphics position four coordinates a no-argument constructor, all the coordinates are set to 0 a parameterized constructor, all the coordinates is set to the corresponding values each coordinate set and reading method abstract void draw (Graphics g) method. MyLine class is responsible for drawing straight lines, to achieve the draw method of the parent class MyRectangle responsible for drawing rectangles, to achieve the parent class draw method MyOval responsible painted oval, draw method to achieve the parent class. Write an application that uses the class defined above, randomly selected location and shape, draw 20 graphics.)
    2021-04-14 09:08:55下载
    积分:1
  • Fingerprint-Data-Acquisition
    室内指纹数据采集系统 采集室内WiFi信号强度,用于WiFi室内定位(Fingerprint Data Acquisition)
    2020-12-20 23:59:10下载
    积分:1
  • src
    书籍Java与模式的随书源代码文件,都可以运行成功,是学习设计模式的好资料(Java and pattern books with the book source code files, you can run successfully, is to learn good information design patterns)
    2013-08-19 12:33:59下载
    积分:1
  • java
    常用java小程序,里面包含一些适合初学者常用的典型java小例子;(java program_example)
    2013-07-27 20:56:34下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载