登录
首页 » Java » Mypicture

Mypicture

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

  • DdmHandleHello
    Handle "hello" messages and feature discovery.
    2014-02-24 10:28:06下载
    积分:1
  • 00219450
    关于RMI的一个安全性人证的的问题,我适宜市是()
    2018-01-27 22:21:49下载
    积分:1
  • hibernate
    hibernate 中文的帮助文档,hibernate api(hibernate api)
    2012-02-17 11:13:20下载
    积分:1
  • the purpose of this software is how to search, which is when the user input for...
    本软件的目的是如何进行网络搜索,也就是当用户输入查询关键词的时候,能够自动的网络资源里面进行查找相关资料。-the purpose of this software is how to search, which is when the user input for keywords, can automatically inside the network resources to search for relevant information.
    2022-08-12 16:18:04下载
    积分:1
  • Thinking-in-java-
    Java编程思想第四版完整中文高清版(免费)(Java programming ideas fourth edition of the complete Chinese HD version (free))
    2013-12-26 14:05:51下载
    积分:1
  • sqlite
    基于安卓系统的数据库使用源代码教程,编译验证可行(Android-based tutorial database using the source code, compile proven feasible)
    2013-11-07 20:22:52下载
    积分:1
  • chapter-03
    java 实现 微信公众平台开发 服务器与微信公众平台连接( java achieve micro-channel public platform)
    2014-02-17 11:32:18下载
    积分:1
  • csh
    实现象ToolTips那样的上下文帮助(The Example of implementing the help of tooltip style)
    2020-07-01 00:40:02下载
    积分:1
  • walkthrough1
    switching the lights debouncing , toggle
    2010-02-10 03:07:08下载
    积分:1
  • Sin-Nombre1
    realize de merge sort
    2013-10-06 09:46:27下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载