登录
首页 » Java » Mypicture

Mypicture

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

  • web
    测试程序,可以很好的利用这个程序解决你所遇到的问题(Test procedure can be a very good use of this procedure to solve the problems encountered by you)
    2008-07-24 11:26:37下载
    积分:1
  • Java
    java学习代码大全,J2SE几乎所有的知识点全部包括在内,可以方便的自学。(java code to learn Daquan, J2SE almost all include all the knowledge points, you can easily self-learning.)
    2011-11-11 16:47:10下载
    积分:1
  • VoiceRecognitionLast---copiaIA
    Realiza reconocimiento de voz de personas
    2012-10-24 23:26:28下载
    积分:1
  • Gaot
    如果定时器的精度影响到你的程序质量,可以下载此源码,多媒体定时器的精度可以达到1ms。定时期间,不会阻塞程序。(If the timer accuracy affects the quality of your program, you can download the source code, multimedia timer accuracy can achieve 1ms. From time to time during the procedure will not cause blockage.)
    2008-01-26 11:01:44下载
    积分:1
  • 功能强大的热点连接,能够跳转到发送邮件和访问Internet资源....
    功能强大的热点连接,能够跳转到发送邮件和访问Internet资源.-powerful hot link to Jump to send e-mail and access Internet resources.
    2023-07-22 22:50:02下载
    积分:1
  • 这是一个关于winsock的网络编程的程序。是一客户端VC视频会议代码,希望对你们有用。...
    这是一个关于winsock的网络编程的程序。是一客户端VC视频会议代码,希望对你们有用。-winsock on the network programming procedures. Is a client code VC Video Conference, and I hope to you useful. Ha ha!
    2022-03-06 20:03:03下载
    积分:1
  • Internet chat room server, based on Socket programming, the use of VC MFC progra...
    网络聊天室服务器端,基于SOCKET编程,使用VC MFC环境编程-Internet chat room server, based on Socket programming, the use of VC MFC programming environment
    2023-06-09 18:15:03下载
    积分:1
  • bootstrap-table-master
    没有功能你想要我写些什么呢?还不少于20个字。。。我去(no everything everybody move go to home)
    2020-06-15 22:23:56下载
    积分:1
  • map
    说明:  基于matlab的地图栅格法建模,可根据txt自定义障碍物。(Based on the map grid method of MATLAB, the obstacles can be customized according to TXT.)
    2020-05-28 10:02:04下载
    积分:1
  • 基于adi blackfin dsp的卷积编码程序,包含多种通信系统中的卷积编码源代码...
    基于adi blackfin dsp的卷积编码程序,包含多种通信系统中的卷积编码源代码-Patrick Blackfin DSP-based convolution coding process, covering a wide variety of communications systems convolutional coding of the source code
    2022-06-21 04:04:05下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载