登录
首页 » Java » Mypicture

Mypicture

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

  • 常用的lanhelp,netsuper等软件都用过吧?自己也写一个?这是个不错的例子。...
    常用的lanhelp,netsuper等软件都用过吧?自己也写一个?这是个不错的例子。-common lanhelp, netsuper software has been used? One has written? This is a good example.
    2022-08-17 08:16:23下载
    积分:1
  • QPR_Control
    比例-谐振控制器,抑制谐波,有效的将谐波滤除(The proportional resonant controller suppresses harmonics and effectively filters harmonics)
    2017-06-21 11:36:07下载
    积分:1
  • vb5_hotkey_control
    vb5_hotkey_control vb(vb5_hotkey_control vb)
    2012-07-27 09:01:31下载
    积分:1
  • ExamingSystem
    利用socket技术来实现C/S模式的考试系统(examing system with sockey tecknological to implements the examing system )
    2020-12-02 19:49:26下载
    积分:1
  • ANTLRTreeNodeStream
    Because of the use of drawSprite, this test is excluded scaled replay tests because drawSprite ignores the reciprocal scale that is applied at record time, which is the intended behavior of drawSprite.
    2015-10-12 11:24:03下载
    积分:1
  • 蚁群算法进行三维路径规划
    在MATLAB中用一群算法实现三维路径规划的代码,可以运行,自己修改地图数据即可达到自己的需求(Using a group of algorithms to realize three-dimensional path planning code in MATLAB, it can run and modify map data to meet its own needs.)
    2019-04-29 09:51:44下载
    积分:1
  • energypick1
    segy地震数据显示,及剖面能量提取!其中包括的二进制数据读取,双缓冲图像显示!舍不得啊。我的宝贝!(segy seismic data, and extract the energy profile! These include binary data read, double-buffer image display! Reluctant ah. My Darling!)
    2007-03-21 10:30:23下载
    积分:1
  • Encryption
    本文介绍利用注册码(序列号)软件加密方法,该方法可实现一机一个流册码,解密难度大(this document introduce how to protect your software by encrypt the application)
    2014-02-12 22:51:54下载
    积分:1
  • ecology_rar
    大名顶顶的泛微的高级产品之一,具体的文档需要的找我,QQ:6-2-3-6-8-5-9-4-1(Weaver顶顶name of one of the senior products, the specific documents required of me, QQ :6-2-3-6-8-5-9-4-1)
    2009-02-15 13:15:53下载
    积分:1
  • 用VB编的winsock服务器端
    用VB编的winsock服务器端-VB series winsock server
    2022-02-01 02:58:06下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载