登录
首页 » Java » Mypicture

Mypicture

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

  • 404140-Code-from-the-book
    Java 7 入门经典源码,Ivor Horton 著(Java 7 edition code)
    2013-12-31 17:19:47下载
    积分:1
  • FLASH源码素材
    FLASH源码素材-甜蜜恋人系列02 甜蜜恋人系列02 -FLASH source material-sweet lovers Series 02 lovers sweet sweet lovers Series 02 lovers sweet lovers Series 02 Series 02
    2023-08-17 22:40:03下载
    积分:1
  • 动态规划
    说明:  leetcode初级算法,动态规划题解,c++实现(Leetcode primary algorithm, dynamic programming problem solving, C + + implementation)
    2020-06-24 02:40:02下载
    积分:1
  • 018-PWM脉冲宽度调制与智能小车PWM直流电机调速
    pwm小车,内有视频,功能强大,讲解详实,是一个不可多得的pwm小车入门。(PWM car, with video, powerful function, detailed explanation, is a rare introduction to PWM car.)
    2020-06-21 06:20:02下载
    积分:1
  • 局域网聊天室(vc++ 原码),很好!
    局域网聊天室(vc++ 原码),很好!-LAN Chat Room (vc original code), good!
    2022-08-18 13:12:47下载
    积分:1
  • RegexTester
    该程序可进行正则表达式的测试,方便开发人员在进行正则表达式书写时,可对正确与否。并能输出Csharp代码。(The program can test regular expressions to facilitate the development of staff during the time of writing regular expressions may be correct or not. And can output CSharp code.)
    2008-01-30 15:21:44下载
    积分:1
  • IconMenu
    说明:  ICO菜单,在VC下编译通过,比较漂亮和实用(ICO menu, compiled by the VC, more beautiful)
    2010-04-12 16:50:59下载
    积分:1
  • USBHID
    说明:  VB遍历USB设备-USB-HID调用工具源代码(VB traversal USB device-USB-HID call tool source code)
    2020-06-14 20:58:17下载
    积分:1
  • 控制拨号连接的类,提供拨号,挂段,脱机工作等方法,检测连接状态。...
    控制拨号连接的类,提供拨号,挂段,脱机工作等方法,检测连接状态。-A Class For Dialup Network Controlling, providing functions of dialing up, putting down, offline, connection status checking, etc
    2022-02-01 23:27:24下载
    积分:1
  • exp1
    模仿XP的资源管理器,基本功能都实现了,个人感觉很强大了。(Mimic XP' s Explorer, the basic functions are realized, a very strong personal feeling.)
    2009-04-26 23:24:35下载
    积分:1
  • 696522资源总数
  • 104047会员总数
  • 21今日下载