登录
首页 » Java » Mypicture

Mypicture

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

  • 2019nCov
    说明:  根据目前的数据进行了SEIR模型的代码实现(SEIR code implementation)
    2020-11-04 20:31:15下载
    积分:1
  • 一个简单的录音放音
    一个简单的录音放音程序 采用vc++编写 功能适宜(A simple recording and play programme, programed with VC++,with proper function.)
    2005-05-14 11:45:44下载
    积分:1
  • 网络连通性测试与网络扫描技术 开发语言 Delphi & Kylix
    网络连通性测试与网络扫描技术 开发语言 Delphi & Kylix-network connectivity testing and network scanning technology development language Delphi Kylix
    2022-04-02 01:26:05下载
    积分:1
  • source code of leach protocol part uamps
    source code of leach protocol part uamps
    2022-07-17 11:52:48下载
    积分:1
  • Source-Programming-Manual-V2.4
    本手册详述于中电41所的1487、144x、146x系列信号发生器的编程方法。介绍SCPI语言,后面有VC例程(This manual describe 1487,144 x, 146x series signal generators programming methods. SCPI language is introduced, followed by VC routines)
    2014-06-07 00:04:01下载
    积分:1
  • Mysniffer001
    windos下网络监视器嗅觉器(sniffer)例子程序(windos Network Monitor olfactory (sniffers) examples procedures)
    2006-12-13 09:42:55下载
    积分:1
  • chat room was designed as a simple example for newcomers to learn
    聊天室的设计,是一个简单的例子,适合新手学习-chat room was designed as a simple example for newcomers to learn
    2022-12-11 02:50:03下载
    积分:1
  • VB-script-5.6-r
    VB script 5.6 对经典的学习js和vbs的教程,微软出品(VB script 5.6 of classical learning js and vbs tutorial, Microsoft Publisher)
    2013-03-24 09:55:57下载
    积分:1
  • The use of WinPcap to capture IP traffic within a local area network and conduct...
    利用 WinPcap 捕获局域网 内的 IP 流量并进行简单分析 本程序是基于 MFC 结构的对话框应用程序,直接双击可执行文件(IPCapture.exe)即 可运行。-The use of WinPcap to capture IP traffic within a local area network and conduct a simple analysis of the structure of this program is based on MFC dialog box application, directly to double-click the executable file (IPCapture.exe) to run.
    2022-03-03 10:26:50下载
    积分:1
  • vb_Auto_Update
    说明:  vb开发的自动升级程序。有自动更新,覆盖原文件等功能(vb development of the automatic upgrade process. Automatic update, overwrite the original files and other functions)
    2011-03-05 15:43:57下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载