登录
首页 » Java » Mypicture

Mypicture

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

  • 2006-01-0081
    SAE PAPER: Potential Benefits in Heavy Duty Diesel Engine Performance and Emissions from the Use of Variable Compression Ratio
    2013-11-17 05:24:48下载
    积分:1
  • shellicon_demo
    从windows程序种查找图标资源,提取图标。(Find the icon resource the windows program, extract the icon.)
    2017-03-14 01:36:13下载
    积分:1
  • 目前国内各大ATM、POS及服务器厂家提供不同的ATM/POS接口标准。由于缺乏规范和控制,严重地阻碍了金融电子化的实施。为了改变这种工作方式,向所有厂家公布布...
    目前国内各大ATM、POS及服务器厂家提供不同的ATM/POS接口标准。由于缺乏规范和控制,严重地阻碍了金融电子化的实施。为了改变这种工作方式,向所有厂家公布布尔公司的终端接口标准。 这个接口标准具有以下几个特点: 1、 标准化:所有交易使用国际金融标准ISO8583。 2、 规范化:所有交易及控制都提供明确的流程。 3、 公开性:所有的加密算法都明确规定。 为了改变终端软件的质量,减少各家用户的协调工作,任何一家终端厂家必须严格遵守此终端标准。我们希望通过努力,使各大银行逐步具备自己的终端规范。 -err
    2022-03-25 08:36:21下载
    积分:1
  • ljep
    简单读文件入数组程序,编译已通过,可直接运行。(Simply read the file into an array of programs, compile has been adopted, can be directly run.)
    2009-11-09 23:10:10下载
    积分:1
  • gauss-legendre
    用gauss-legendre方法计算积分的近似值(Gauss-legendre with integral approximation method)
    2008-04-16 17:50:55下载
    积分:1
  • javaworks
    JAVA编写的家用电器管理系统,可以生成负荷曲线(Household electrical appliance management system)
    2020-11-26 15:09:31下载
    积分:1
  • 用VC SOCKET实现聊天室的服务器端
    用VC SOCKET实现聊天室的服务器端-VC SOCKET use chat rooms to achieve the server-side
    2023-07-06 02:30:03下载
    积分:1
  • fastdb-3.31.tar
    FastDb是高效的内存数据库系统,具备实时能力及便利的C++接口。FastDB不支持client-server架构因而所有使用FastDB的应用程序必须运行在同一主机上。FastDB针对应用程序通过控制读访问模式作了优化。(FastDb is efficient memory database systems, with real-time capability and convenience of the C interface. FastDB not support client-server structure which all use of the application process FastDB Order must be running in the same host. FastDB against applications by controlling access mode was reading optimization.)
    2006-08-23 23:35:21下载
    积分:1
  • main.c
    hmac-sha1 hello worldhello worldhello worldhello worldhello worldhello worldhello world(hello worldhello worldhello worldhello worldhello worldhello world)
    2015-11-23 18:18:03下载
    积分:1
  • choice Retransmission Agreement receiving end procedures, network protocol progr...
    选择重传协议接收端程序,网络协议编程实例,能够很好的理解网络编程的意义-choice Retransmission Agreement receiving end procedures, network protocol programming examples, can understand the significance of Network Programming
    2022-03-10 14:43:12下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载