登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 259
下载积分: 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 个回复

  • jspchat
    简单的聊天室程序 大家一起学习提高 呵呵 。。。。。(Simple chat room to join the study and improvement of procedures Ha ha. . . . .)
    2009-05-11 23:34:06下载
    积分:1
  • VC网络与通信经典
    VC网络与通信经典编程-VC networking and communications classical programming
    2022-02-22 08:05:51下载
    积分:1
  • jiugongpaixu
    九宫图排序,实现记录功能,中间为空,沿四周分布(Figure Jiugong sort of record function, the middle is empty, surrounded by distribution along the)
    2011-05-26 19:02:21下载
    积分:1
  • passthru的扩展源码
    passthru的扩展源码-passthru expansion FOSS
    2023-05-19 14:10:02下载
    积分:1
  • 最基本的IE的实现,可实现网络连接.在VC6.0下译通过.
    最基本的IE的实现,可实现网络连接.在VC6.0下编译通过.-IE the most basic realization of the network connection can be realized. In under VC6.0 compiler through.
    2022-01-25 20:07:02下载
    积分:1
  • ftp upload and download procedures. Windows Socket
    ftp上传和下载文件的程序.Windows Socket-ftp upload and download procedures. Windows Socket
    2022-01-26 06:02:42下载
    积分:1
  • gugujj88
    在labview实现小波(wavelet)分解和和合成,不错的源码,很好(In LabVIEW to achieve wavelet (wavelet) decomposition and synthesis, a good source code, very good)
    2017-07-04 20:12:36下载
    积分:1
  • 利用VC写的小序,可以获取当前的工作组……大家可以学习参考一下...
    利用VC编写的小程序,可以获取当前的工作组……大家可以学习参考一下-VC prepared using a small program, you can obtain the current working group ... ... everyone can learn from reference
    2022-02-01 16:42:01下载
    积分:1
  • 基于openh323开发的网络会议服务器软件。
    基于openh323开发的网络会议服务器软件。-based on the development of Web conferencing server software.
    2022-10-13 11:00:02下载
    积分:1
  • m_3D_top_inversion
    带地形的三维物性反演程序,可供实际数据处理参考(3-D physical property inversion program with terrain, which can be used for reference in actual data processing)
    2020-12-29 21:39:01下载
    积分:1
  • 696516资源总数
  • 106936会员总数
  • 1今日下载