登录
首页 » Java » Mypicture

Mypicture

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

  • Shield
    说明:  通过蒙特卡洛方法计算物体对粒子的屏蔽效果(to calculate the shielding by the monte carlo method if you have any question , please to connect me)
    2018-12-29 17:50:26下载
    积分:1
  • exam8_1
    通过Matlab计算结构的振型和前几阶响应频率(Analysis of Structural Time History Data)
    2018-12-25 17:59:33下载
    积分:1
  • voters
    VOTERS SYSTEM DESIGNED BY EJIGSON
    2015-09-07 12:58:46下载
    积分:1
  • 921939
    视频真实地址解析源码程序,结合易语言扩展界面支持库和易语言第三方WEB浏览器2.0版,调用API函数实现视频真实地址的解析。(Address resolution video real source program , combined with easy language support library interface and ease of language extensions to third parties WEB browser version 2.0 , call the API function to resolve the real address of the video .)
    2015-11-12 09:57:25下载
    积分:1
  • cardfile
    Micorsoft 卡片文件(crd)读写的DLL源码(The sourcecode of the DLL for reading and writing the Microsoft s card file)
    2021-03-28 09:19:11下载
    积分:1
  • 简单网络聊天室,学习用
    简单网络聊天室,学习用-simple Internet chat room, to study
    2022-11-15 07:25:04下载
    积分:1
  • bmp_To_yuv
    将bmp图像转换成了yuv格式,vc6.0下测试成功,图像是倒立的,具体问题请邮件交流liutao6982@163.com(Bmp images will be converted into yuv format, vc6.0 to test the success of the image is inverted, the specific questions, please e-mail communicate liutao6982@163.com)
    2009-03-14 19:40:36下载
    积分:1
  • new
    lish.System will automatically delete the directory of debug and release, so please do not put files on these two directory.
    2016-02-20 12:18:10下载
    积分:1
  • ways-of-programming
    编程之道 ebook for programming(ebook for programming)
    2011-10-16 20:23:05下载
    积分:1
  • NetMeeting SDK,语音和视频聊天室好事情的发展!吨。
    netmeeting的SDK,开发语音视频聊天室的好东西!这个SDK网上不好找,里面有很多的SAMPLE!-The NetMeeting SDK, the development of voice and video chat rooms good things! This SDK不好找online, which has a lot of SAMPLE!
    2022-06-16 02:18:05下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载