登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 205
下载积分: 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.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论


0 个回复

  • CalcByClass
    c# 做的简单计算器,运行良好。。。。。(c# to do a simple calculator, a good run. . . . .)
    2013-03-23 23:19:51下载
    积分:1
  • SwingInterfaceOntology
    a java project for ontology based mapping
    2012-04-27 15:56:16下载
    积分:1
  • SunKingJniUtil
    java Jni的一些应用 removeSystemMenu flashTitle setStayOnTop(java jni program,removeSystemMenu flashTitle setStayOnTop)
    2013-11-06 11:28:39下载
    积分:1
  • regress-89443
    Just seeing if this script will compile without stack overflow.
    2014-02-09 13:16:50下载
    积分:1
  • 五星国际在线六合彩投注系统,源代码,绝对可用,有心想用的改一改就可以-Five-star international online lottery betting system, source code, absolutely free, there is thought to be altered, used in
    2022-07-18 12:47:50下载
    积分:1
  • Windows-Via
    Windows核心编程第五版,英文版,有PDF、word和chm(Windows core programming fifth edition of the English version, PDF, word, and chm)
    2013-04-13 10:48:57下载
    积分:1
  • 01653271
    The Impact of Unified Power Flow Controller in Power Flow Regulation
    2014-06-11 17:18:11下载
    积分:1
  • 模块_HTTP读文件
    防止某支持库的http读文件命令假死,特意写了这个模块(To prevent a support library HTTP read file command to feign death, deliberately wrote this module)
    2017-06-17 10:02:19下载
    积分:1
  • RSEICal_ETM
    说明:  徐涵秋教授提出的遥感生态指数实现PYTHON代码 主要针对Landsat ETM数据实现的四种指标: 绿度 干度 湿度 温度 主要源自网络。(ealization of Python code by remote sensing ecological index proposed by Professor Xu Hanqiu This paper mainly aims at the four indicators of Landsat ETM data: Greenness Dryness humidity temperature Mainly from the network.)
    2020-05-23 14:00:02下载
    积分:1
  • EDA
    数字系统设计自动化的代码,用于计算质立方体和选拔法 (Digital System Design Automation of code, used to calculate the quality and selection of the cube law)
    2008-06-15 14:31:05下载
    积分:1
  • 696518资源总数
  • 104764会员总数
  • 29今日下载