登录
首页 » Java » Mypicture

Mypicture

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

  • IP数据包洪水
    IP packet Flooding
    2023-01-14 19:50:03下载
    积分:1
  • vnc
    说明:  使用VC++的开发远程控制软件源码实例,全部英文,包括用到的一些类库,都有源文件(VC ++ development remote control software source code examples, all English, including some class libraries used, have source files)
    2020-04-01 19:50:34下载
    积分:1
  • Cascade
    说明:  cascade密钥协商的程序,希望对大家有所帮助吧(this is a programme of cascade key Java)
    2019-06-26 17:04:48下载
    积分:1
  • 简单的 购物系统 可以清晰的了解购物的业务流
    简单的 购物系统 可以清晰的了解购物的业务流程-The system can be easy to clear to know the business processes
    2022-07-18 18:48:02下载
    积分:1
  • code2
    Package consists of 3 codes. First,to Print huffman decoding tree given.Second, to find top level view of a tree. Third, A reviewer rates the two challenges, awarding pointsfor three categories.We define the rating for two person s challenge to be the triplets .Your task is to find their comparison scores by comparing the triplets. If first digit of triplets is greater for person A, then the person A is awarded 1 point, else person B, and if equal, no one gets points.Given the triplets, compare the two challenges and print their respective comparison points.
    2016-10-02 15:23:20下载
    积分:1
  • 局鱼网 短消息开发,java
    局鱼网 短消息开发,java-nets Short Message Board development, java
    2023-04-12 17:15:03下载
    积分:1
  • Struts-Hibernate-Example
    Java Hibernate integration
    2011-10-01 16:51:58下载
    积分:1
  • mptcp-1.8-en.tar
    adhoc network protocols mptcp protocol
    2021-03-22 15:49:17下载
    积分:1
  • pareit2012
    The History of WiMAX: A Complete Survey of the Evolution in Certification and Standardization for IEEE 802.16 and WiMAX Daan Pareit, Bart Lannoo, Ingrid Moerman, Member, IEEE, and Piet Demeester, Fellow, IEEE
    2015-06-05 07:04:43下载
    积分:1
  • Vb pinao
    vb pinao you can try it
    2018-08-27 15:45:46下载
    积分:1
  • 696524资源总数
  • 103816会员总数
  • 64今日下载