登录
首页 » Java » Mypicture

Mypicture

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

  • sqljdbc
    基于JAVA jdk1.7的MyEclipse连接mssql的驱动JAR(mssql of MyEclipse)
    2012-09-13 23:35:48下载
    积分:1
  • java
    常用java小程序,里面包含一些适合初学者常用的典型java小例子;(java program_example)
    2013-07-27 20:56:34下载
    积分:1
  • Windows_API
    非常实用的Windows API参考手册,可以方便开发者快速查找所需API(Very useful Windows API reference manual, you can easily find the API developers to quickly)
    2010-05-16 18:35:32下载
    积分:1
  • 计算机网络
    Computer Networking--A multithreaded Web server
    2023-09-06 06:55:03下载
    积分:1
  • ding
    画逻辑电路图基本功能: 1。文件的保存,打开; 2。添加基本元件; 3。画点,画线; 4。删除元件(Painting the basic functions of the logic circuit diagram: 1. Documents, open 2. Add the basic components 3. Painting point, drawing a line 4. Delete components)
    2007-12-01 09:19:20下载
    积分:1
  • RTC8564
    This is the Complet Datasheet of the RTC. It is verry hard to find on the net.
    2013-12-23 03:48:27下载
    积分:1
  • 本例实现了一个完整的四人网络麻将游戏,该序集服务器与客户端功能与一体。本例主要介绍了非对等的网络服务功能的建立,传输信息的序列化,建立虚拟的三维空间,绘制图形...
    本例实现了一个完整的四人网络麻将游戏,该程序集服务器与客户端功能与一体。本例主要介绍了非对等的网络服务功能的建立,传输信息的序列化,建立虚拟的三维空间,绘制图形和显示位图,在内存中创建位图和绘制图形等。 -the cases to achieve a complete network of four mahjong games, the procedures set server and client functions and integration. The cases are introduced to the non-network services established, the sequence of transmission of information, the establishment of a virtual three-dimensional space, drawing and display bitmap in memory to create bitmap graphics and mapping.
    2023-03-25 04:00:03下载
    积分:1
  • xs436
    可实现对二维数据的聚类,代码里有很完整的注释和解释,有井曲线作为输入可计算其地震波的衰减。( Can realize the two-dimensional data clustering, Code, there are very complete notes and explanations There is a well attenuation curve as input to calculate its seismic waves.)
    2017-04-28 19:19:02下载
    积分:1
  • Turbine
    热力学元件,实现了膨胀机(turbine)的仿真。使用matlab-simulink中的s-function模块编辑。可改为动态仿真(Thermodynamic elements are used to realize the simulation of turbine. Edit with S-function module in matlab-simulink. Can be changed to dynamic simulation)
    2021-03-26 12:39:13下载
    积分:1
  • lan中的端口映射
    lan中的端口映射程序-the port mapping procedures
    2023-01-30 05:30:03下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载