登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 270
下载积分: 1 下载次数: 1

代码说明:

  定义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
.........\.classpath,301,2012-10-02
.........\.project,385,2012-10-02
.........\bin
.........\...\DrawComponent.class,1507,2012-10-12
.........\...\MyJframe.class,661,2012-10-12
.........\...\MyLine.class,710,2012-10-12
.........\...\MyOval.class,716,2012-10-12
.........\...\Mypicture$1.class,648,2012-10-12
.........\...\Mypicture.class,512,2012-10-12
.........\...\MyRectangle.class,730,2012-10-12
.........\...\MyShape.class,1266,2012-10-12
.........\src
.........\...\DrawComponent.class,1009,2013-11-03
.........\...\MyJframe.class,562,2013-11-03
.........\...\MyLine.class,537,2013-11-03
.........\...\MyOval.class,543,2013-11-03
.........\...\Mypicture$1.class,536,2013-11-03
.........\...\Mypicture.class,408,2013-11-03
.........\...\Mypicture.java,3976,2012-10-03
.........\...\MyRectangle.class,552,2013-11-03
.........\...\MyShape.class,946,2013-11-03

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

发表评论

0 个回复

  • d3d9test
    It Is d3 dRs es sts s
    2014-03-11 09:27:54下载
    积分:1
  • Clock
    VC++可切换到数字模式的圆形时钟,VC++编程学习源码,很好的参考资料。(VC++ round the clock to switch to digital mode, VC++ programming learning source, a good reference.)
    2014-02-08 17:22:58下载
    积分:1
  • 局域网络监控,能分析结果。不支持ipv6。
    局域网络监控,能分析结果。不支持ipv6。-LAN monitoring and analysis of results. Ipv6 not support.
    2022-02-26 01:29:53下载
    积分:1
  • JAVA
    MakeBar.dll二维条码生成动态连接库,用以生成PDF417二维条码,适用于windows环境开发工具。(This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. )
    2013-01-03 14:53:56下载
    积分:1
  • socket
    说明:  socket 学习文件,供各位参考学习。(Socket learning file)
    2020-06-20 11:00:02下载
    积分:1
  • a simple but practical message boards
    一个简单又实用的留言版-a simple but practical message boards
    2022-02-10 13:42:41下载
    积分:1
  • c# wifi串口测试
    C# wifi串口测试。类似串口调试助手。搜索设备SendHex
    2023-04-24 00:45:03下载
    积分:1
  • 简易电子白板的实现,可以帮助对实现白板的朋友有所帮助
    简易电子白板的实现,可以帮助对实现白板的朋友有所帮助-Simple Whiteboard realize, can help to realize whiteboard friends help
    2023-06-29 15:15:03下载
    积分:1
  • Service100
    创建一个Windows服务程序例子,简单明了。(windows service program demo)
    2016-05-08 00:13:13下载
    积分:1
  • Serva
    Serva server for Windows
    2017-08-16 06:23:18下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载