登录
首页 » Java » Mypicture

Mypicture

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

  • 潮汐调和分析
    说明:  利用实测潮位数据,进行潮汐调和分析,计算调和常数的振幅和迟角(Based on the measured tidal level data, tidal harmonic analysis is carried out, and the amplitude and lag angle of harmonic constant are calculated)
    2020-11-24 10:47:39下载
    积分:1
  • 数据包捕获,协议分析
    数据包捕获,协议分析- Data packet capture, protocol analysis
    2023-06-12 13:45:03下载
    积分:1
  • 服务端通信程序,可以进行点对点的通信连接
    服务端通信程序,可以进行点对点的通信连接-Service client communication procedures, can be point-to-point communication links
    2022-07-27 14:25:12下载
    积分:1
  • reg_u_sub
    Core floating point subtraction routine.
    2015-06-12 18:31:24下载
    积分:1
  • Chat client
    客户端服务器聊天室源代码,使用VC(visual C++)编写的。使用access数据库。-Chat client-server source code, the use of VC (visual C++) Prepared. The use of access database.
    2022-03-11 10:51:23下载
    积分:1
  • 如何设置多播套接字属性,并使用它时,多播路由问题。
    如何设置套接字的多播属性,并利用它时行多播编程-How to set the multicast socket attribute, and use it when the line multicast programming
    2022-01-25 18:28:27下载
    积分:1
  • R-java
    使用java实现R树,包括插入,删除,查找等功能(Using java to achieve R-tree, including insert, delete, search and other functions)
    2021-04-19 20:48:51下载
    积分:1
  • kzcxwzck
    控制其他程序成为自己的子窗体,属vb编程窗体、介面类。(Control other programs become their own child form, is a form vb programming, interface classes.)
    2015-02-25 13:41:49下载
    积分:1
  • awesome-cpp-master
    说明:  A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.
    2020-06-24 22:00:02下载
    积分:1
  • bingo
    自己做的两个小病毒和一个控制开关机的程序。。。小病毒求大神指点aaa(Own two small virus and a control switch procedure. . . The god of small viruses seek advice aaa)
    2013-12-26 18:46:40下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载