登录
首页 » Java » Mypicture

Mypicture

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

  • threadtest
    java多线程示例,可以直接运行,希望对大家有所帮组Thread(java multithreading example, can run, we hope to help set Thread)
    2011-05-01 00:49:04下载
    积分:1
  • Kriging_WENG
    c++实现克里金插值法并使用openGL展示等值线(Kriging Interpolation and OpenGL Display)
    2019-06-13 14:47:39下载
    积分:1
  • textsplittextnomodificationallowederrEE
    Create an ent3 reference and execute the "splitText(offset)" method.
    2013-10-30 21:53:50下载
    积分:1
  • wushuichuli
    一个很详细的基于组态王的污水处理系统,亲测可以运行,无密码(A very detailed Kingview based sewage treatment system, pro-test can be run without a password)
    2014-11-25 15:10:16下载
    积分:1
  • RunExesvc
    说明:  本软件以windows服务程序方式运行。 安装,执行install.bat,卸载执行uninstall.bat 配置:RunExe.ini。ExeRun设定运行程序,RunTime设定执行时间,可以是多个时间,运行后30分钟,自动关闭调用的程序。 仅当windows处于用户窗口登录状态时,也就是explorer.exe运行时,才执行。 执行时,被调用的程序显示窗口。 服务程序自动调用程序运行,并显示程序窗口。 当判断到Explorer在运行时,将根据设定时间,自动调用程序运行,30分钟后如果调用执行的程序未关闭,则自动将其关闭。(This software runs in the way of windows service program. Install, execute install. bat, uninstall. bat unload Configuration: RunExe.ini. ExeRun sets the running program and RunTime sets the execution time, which can be multiple times. 30 minutes after running, the calling program is automatically closed. Windows is executed only when it is in the user window login state, that is, when explorer.exe runs. When executed, the called program displays the window. The service program automatically calls the program to run and displays the program window. When it is judged that Explorer is running, the program will be automatically invoked according to the set time. If the program is not closed after 30 minutes, it will be automatically closed.)
    2020-06-25 02:00:02下载
    积分:1
  • javascripts
    基于MOOnTOOLs所开发的一个导航拦仅供参考(MOOnTOOLs developed based on a navigation bar for reference only)
    2008-05-13 23:30:19下载
    积分:1
  • C #发达如何发送电子邮件
    用C#开发的如何发送电子邮件的源码.可实现内部邮件的管理.-With C# Developed how to send e-mail source. May achieve the internal e-mail management.
    2022-07-02 18:05:42下载
    积分:1
  • Everything
    说明:  轻巧强大的文件搜索工具 比windows自带的强1000倍(Lightweight powerful file search tool that comes with windows than 1,000 times stronger)
    2010-04-29 17:05:43下载
    积分:1
  • ATMjava
    建议的模拟银行存款操作,取款操作以及查询相应的余款(Simulation of the proposed operation of bank deposits, cash operating balance, as well as the corresponding query)
    2009-05-14 20:05:49下载
    积分:1
  • LaVolpeImageList
    VB支持真彩图标的ImageList 列表控件,有需要的下(VB support image icon ImageList list control, there is need)
    2013-08-04 09:05:00下载
    积分:1
  • 696518资源总数
  • 105012会员总数
  • 9今日下载