文件名称:Mypicture
-
所属分类:
- 标签属性:
- 上传时间:2013-11-08
-
文件大小:13.08kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
定义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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Mypicture/
Mypicture/.classpath
Mypicture/.project
Mypicture/.settings/
Mypicture/.settings/org.eclipse.jdt.core.prefs
Mypicture/bin/
Mypicture/bin/DrawComponent.class
Mypicture/bin/MyJframe.class
Mypicture/bin/MyLine.class
Mypicture/bin/MyOval.class
Mypicture/bin/MyRectangle.class
Mypicture/bin/MyShape.class
Mypicture/bin/Mypicture$1.class
Mypicture/bin/Mypicture.class
Mypicture/src/
Mypicture/src/DrawComponent.class
Mypicture/src/MyJframe.class
Mypicture/src/MyLine.class
Mypicture/src/MyOval.class
Mypicture/src/MyRectangle.class
Mypicture/src/MyShape.class
Mypicture/src/Mypicture$1.class
Mypicture/src/Mypicture.class
Mypicture/src/Mypicture.java
Mypicture/.classpath
Mypicture/.project
Mypicture/.settings/
Mypicture/.settings/org.eclipse.jdt.core.prefs
Mypicture/bin/
Mypicture/bin/DrawComponent.class
Mypicture/bin/MyJframe.class
Mypicture/bin/MyLine.class
Mypicture/bin/MyOval.class
Mypicture/bin/MyRectangle.class
Mypicture/bin/MyShape.class
Mypicture/bin/Mypicture$1.class
Mypicture/bin/Mypicture.class
Mypicture/src/
Mypicture/src/DrawComponent.class
Mypicture/src/MyJframe.class
Mypicture/src/MyLine.class
Mypicture/src/MyOval.class
Mypicture/src/MyRectangle.class
Mypicture/src/MyShape.class
Mypicture/src/Mypicture$1.class
Mypicture/src/Mypicture.class
Mypicture/src/Mypicture.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.