登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 164
下载积分: 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.)

文件列表:

Mypicture
.........\.classpath,301,2012-10-02
.........\.project,385,2012-10-02
.........\bin
.........\...\DrawComponent.class,1507,2012-10-12
.........\...\MyJframe.class,661,2012-10-12
.........\...\MyLine.class,710,2012-10-12
.........\...\MyOval.class,716,2012-10-12
.........\...\Mypicture$1.class,648,2012-10-12
.........\...\Mypicture.class,512,2012-10-12
.........\...\MyRectangle.class,730,2012-10-12
.........\...\MyShape.class,1266,2012-10-12
.........\src
.........\...\DrawComponent.class,1009,2013-11-03
.........\...\MyJframe.class,562,2013-11-03
.........\...\MyLine.class,537,2013-11-03
.........\...\MyOval.class,543,2013-11-03
.........\...\Mypicture$1.class,536,2013-11-03
.........\...\Mypicture.class,408,2013-11-03
.........\...\Mypicture.java,3976,2012-10-03
.........\...\MyRectangle.class,552,2013-11-03
.........\...\MyShape.class,946,2013-11-03

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 4684563
    大强学易之大强写字板,应用程序编程源码,很好的参考资料。(It is easy to learn the Daqiang WordPad, application programming source code, a good reference.)
    2013-10-24 07:54:10下载
    积分:1
  • migration
    程序为叠前偏移c语言程序,利用双程波波动方程有限差分法,此程序可以进行大角度成像。还有prestack common-shot split-step Fourier migration源代码(prestack fd migration,The 2-D prestack common-shot split-step Fourier migration)
    2013-12-09 14:59:15下载
    积分:1
  • 股票数据读取接口delphi
    股票数据读取接口Delphi源码,RSR证券实时行情显示 股票数据读取接口Delphi源码,RSR证券实时行情显示,应用了RSRStock.dll控件,更新日志:2010.10.27: 增加采用注册回调函数方式获取数据,详细函数声明请参考 uFunction.pas 相关数据结构声明请参考 TDXGrobal.pas,以S_打头的均为注册回调函数的函数。 以
    2023-06-21 01:25:03下载
    积分:1
  • ch3
    水晶报表VC实例,实例主要实现了水晶报表的按组字段分类,按字段排序,以及检索功能(CrystalReports)
    2010-06-23 20:51:18下载
    积分:1
  • moon-master
    moonmaster user develop font
    2020-06-20 13:20:01下载
    积分:1
  • jk3d
    说明:  克里金插值算法的实现,包括3D的插值算法(Implementation of Kriging algorithm)
    2019-05-23 16:45:20下载
    积分:1
  • JAVA脚本源代码,一些很流行的代码,试用于初学者
    JAVA脚本源代码,一些很流行的代码,试用于初学者-Java script source code, some of the very popular code, use it on beginners
    2023-07-27 12:40:03下载
    积分:1
  • nand_ecc
    This file contains an ECC algorithm that detects and corrects 1 bit errors in a 256 byte block of data.
    2013-03-29 13:28:31下载
    积分:1
  • login
    高仿CF的CS启动器,用于CS仿CF的MOD制作。 特点:易语言编写,使用png真彩窗口,图片可直接使用CF目录下文件。 主要功能,启动CS1.6游戏,高仿CF登陆器,读取修改本地ini游戏配置文件,进行与游戏设置有关的注册表操作。 使用方法:编译后放于CS目录下,用到的图片、离线网页、ini请自行收集,可从网络上流行的CF单机版中拷贝。 源码用到了Z真彩动画窗口.ec 和 精易模块 V3.0.ec ,请自行百度补充相关模块。(High imitation of CF CS starter for CS CF imitation of MOD production. Features: Easy language, use png true color window, pictures can be used directly under the CF catalog file. The main function, start CS1.6 games, high imitation CF landers, read modify the local ini game profile settings related to registry operations and games. Usage: After compiling put in CS directory, use the picture, offline web pages, ini your own collection, available from the network CF popular stand-alone version of the copy. Source used the Z true color and fine animation window .ec easy module V3.0.ec, your own Baidu supplement related modules.)
    2014-08-16 20:22:32下载
    积分:1
  • open3389源
    打开3389端口的一个小程序,c++编写,亲测可用,欢迎测试。(Open a small program on port 3389, written in C++, pro-test available, welcome to test.)
    2020-06-16 09:20:01下载
    积分:1
  • 696518资源总数
  • 104347会员总数
  • 12今日下载