文件名称:testshape
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
3. 设计一个接口Shape,接口中包含方法:Draw和Resize。定义一些具体类,如:Point、Line、Circle、Rectangle等,每个类都实现接口Shape。Draw方法绘制图形,Resize方法改变图形大小。用Java实现这些接口和类,并用测试类测试它们。 注意:不需要真正绘制图形,如Line的Draw方法只需输出下面文本即可: “直线的起点是(x1,y1,),终点是(x2,y2)”-3. A Shape interface design, interfaces include : Draw and Resize. Some specific type definition, such as : Point, Line, Circle, Rectangle, each category are achieving Shape interface. Draw method of drawing, graphics Resize changed size. Using Java to achieve these interfaces and class, and use tests such testing. Note : no real drawing, such as the Draw Line method, only the following text can be output : "line is the starting point (x1, y1), and the ultimate goal is to (x2, y2)"
(系统自动生成,下载前可以参看下载内容)
下载文件列表
testshape.java