登录
首页 » Java » Mypicture

Mypicture

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

  • 一个地形渲染的引擎 terrainengine
    一个地形渲染的引擎,能够输入dem数据,生成3D地形(A terrain rendering engine, can be dem input data to generate 3D terrain)
    2008-08-04 16:09:56下载
    积分:1
  • 网络传输文件
    网络传输文件-network to transfer files
    2022-01-30 13:05:02下载
    积分:1
  • fb plus tree
    FB+-tree: Indexing Based On Key Ranges
    2017-08-31 15:09:16下载
    积分:1
  • hello-world-portlet
    liferay portlet 实例,可以直接部署(liferay portlet instance, can be directly deployed)
    2013-08-03 12:57:10下载
    积分:1
  • easyhttp.zip 代理软件
    easyhttp.zip 代理软件-easyhttp.zip Agent Software
    2022-01-28 13:13:32下载
    积分:1
  • AFEM@matlab
    说明:  有限元编程的源程序,是由国外大学编写的经典有限元程序,附件有详细说明!(Finite element programming source is prepared by the foreign universities classical finite element procedure is described in detail in Annex!)
    2021-04-27 09:28:44下载
    积分:1
  • UPDATED_1016615310212003
    说明:  vb内嵌汇编获取CPU ID,支持INTEL 和 AMD的CPU(vb inline assembly for CPU ID, INTEL and AMD CPU support)
    2011-03-28 17:50:17下载
    积分:1
  • 三角形单元(含序及应力、应变云图)
    说明:  matlab程序,计算三角形单元变形受力,可绘制应力云图,位移云图(Calculation of deformation and stress of beam element)
    2021-04-06 11:39:02下载
    积分:1
  • BankSystem
    刚学完VC++,试着在VS2010下编写的一个银行活期储蓄系统,用到MFC对话框、CSocket、数据库(After studying VC++, try to write in a bank Savings VS2010 system, used in MFC dialog, CSocket, database)
    2014-01-26 16:26:17下载
    积分:1
  • cangku
    仓库管理系统,SSH+MySQL仓库管理系统,SSH+MySQL仓库管理系统,SSH+MySQL仓库管理系统,SSH+MySQL仓库管理系统,SSH+MySQL(Warehouse management system, SSH+ MySQL warehouse management system, SSH+ MySQL warehouse management system, SSH+ MySQL warehouse management system, SSH+ MySQL warehouse management system, SSH+ MySQL)
    2017-05-05 17:40:45下载
    积分:1
  • 696516资源总数
  • 106562会员总数
  • 4今日下载