登录
首页 » Java » Mypicture

Mypicture

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

  • computerspecialpersonVisualc
    计算机专业人员vc开发设计很经典的vc专业书籍(Computer Professionals for Development and design of the classic books vc)
    2007-01-28 23:18:18下载
    积分:1
  • 12821599
    日期时间计算,判断日期时间合法性,转成统一格式,回车代替TAB键,等公共函数()
    2017-09-21 14:07:59下载
    积分:1
  • vbdecoder
    说明:  VB编写的电子工程色环电阻值计算程序,色值 3 = 倍数 色值 4 = 容限。(The color engineering resistance calculation program of electronic engineering written by VB, color value 3 = multiple color value 4 = tolerance.)
    2020-06-21 10:46:36下载
    积分:1
  • HasPositionalPredChecker
    Has Positional Pred Checker extends X Path Visitor Source Code for Andriod.
    2014-01-01 11:38:11下载
    积分:1
  • javajishibenandwannianli
    本程序显示日历、时间和记事本的基本功能。(joijslkjdlksdkjdlksdlkdlslkj)
    2020-09-20 14:07:55下载
    积分:1
  • XTab
    说明:  vb下的tab不怎么好用,这个是扩展-XTAB(tab extended-XTAB)
    2009-07-26 04:00:20下载
    积分:1
  • gugujj88
    在labview实现小波(wavelet)分解和和合成,不错的源码,很好(In LabVIEW to achieve wavelet (wavelet) decomposition and synthesis, a good source code, very good)
    2017-07-04 20:12:36下载
    积分:1
  • Food
    增删改查功能实现有数据库sql,提供给大家学习(Add, delete, modify and check functions to achieve database sql, for everyone to learn)
    2019-01-15 16:41:12下载
    积分:1
  • 利用socket实现的一个小的聊天室的序,多线,mfc界面
    利用socket实现的一个小的聊天室的程序,多线程,mfc界面-use socket achieve a small chat room procedures, multithreading, mfc interface
    2022-05-05 20:24:01下载
    积分:1
  • hyperic-sigar-1.6.4
    sigar1.6.4源代码用于获取系统信息 如内存CPU使用率 等(sigar1.6.4 source code used to obtain system information such as CPU utilization, memory)
    2011-07-15 16:11:18下载
    积分:1
  • 696518资源总数
  • 106010会员总数
  • 4今日下载