登录
首页 » Java » Mypicture

Mypicture

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

  • Blend
    Percent of total mosaicing time spent on each of the following operations.
    2015-07-01 15:36:27下载
    积分:1
  • JNAChina
    这是一个介绍jna的pdf,对初学者可能会有帮助(This is a description jna the pdf, may be helpful for beginners)
    2010-08-13 10:21:45下载
    积分:1
  • SpringEhcache_Demo
    Ehcache +spring 的Demo实例(how to use Ehcache with Spring)
    2012-12-10 13:23:01下载
    积分:1
  • niubi
    说明:  比较牛逼的snmp程序,关于拓扑发现的程序,(More Niubi the snmp procedures, on the topology discovery procedure)
    2021-03-14 14:09:23下载
    积分:1
  • ACE-Lock(ACE_Task_Base)
    ACE线程管理机制-并发控制和基于ACE实现的一个内存池(Thread management mechanism ACE- ACE-based concurrency control and achieve a memory pool)
    2013-11-03 22:41:58下载
    积分:1
  • 7651
    图片移动源码例程,程序结合易语言OPenGL支持库,调用API函数实现图片的处理效果。易语言图片移动源码例程属于易语言进阶教程。(Pictures mobile source routines, programs combine easy language OPenGL support library , call the API function to achieve image processing effects. )
    2015-03-18 21:36:01下载
    积分:1
  • Kline_Original
    VC++6.0 MFC for Stock KLine
    2020-06-25 16:40:02下载
    积分:1
  • design-of-SRM
    design of SRM The Mathcad programs were saved as version 6 files from version 2001. Since no special features not available in version 6 were used it is expected that they can be run by Mathcad 6 or later. Flux.mcd A program to plot the SRM’s flux linkage curves. Torque.mcd A program to plot the SRM’s static torque curves. Motorsim.mcd A program to simulate the SRM running at constant speed and driven from a constant DC source. It assumes the SRM phases are independent and simulates one phase for one cycle. It assumes the torque and current for the simulated phase is equal to that for all of the other phases with the appropriate time shift. It predicts the performance of the machine and inverter calculating such things as weight, power out, power loss, and phase current.
    2013-08-03 08:27:25下载
    积分:1
  • foreigner writing a Web e
    老外写的一个网页邮件服务器,已经汉化,里面有简单的说明。-foreigner writing a Web e-mail servers, have finished, which has a simple explanation.
    2022-05-15 04:28:17下载
    积分:1
  • bjgm
    四间隔频率变化,并循环输出50~51ms之间的频率。(Four-interval frequency changes and the cycle between 50 ~ 51ms output frequency.)
    2008-08-21 11:46:20下载
    积分:1
  • 696516资源总数
  • 106409会员总数
  • 8今日下载