登录
首页 » Java » Mypicture

Mypicture

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

  • Master-Sample-Code
    倍福开源主站源码 Master Sample Code(Beckhoff open source Master Master Sample Code)
    2015-06-26 15:09:06下载
    积分:1
  • 玫瑰曲线
    说明:  至少4种玫瑰线 的作图,图形可参见数学手册(可以用定点运算;建议采用浮点运算)。其中的a、n、φ参数可修改(at least four species of roses line drawing, graphics can be found in mathematics Manual (Operators can use sentinel; Proposed floating-point operations). The a, n, can modify parameters)
    2005-12-07 13:06:14下载
    积分:1
  • 一个用winsock开发的代理服务器
    一个用winsock开发的代理服务器-a development of the protocols of using a proxy server
    2022-08-14 19:28:06下载
    积分:1
  • Windows Socket网络与规范
    Windows Socket网络编程与规范-Windows Socket network programming and standard
    2022-01-26 03:36:52下载
    积分:1
  • exercise-cases
    说明:  PSCAD仿真算例,非常有用的算例信息,大家可以参照参照(PSCAD simulation example, the information very useful example, we can refer to reference)
    2011-03-13 14:48:56下载
    积分:1
  • SpinnerButtonDemo
    spinner的应用源码,非常酷炫,很好的资源(spinner application source code, very cool, very good resource)
    2014-02-05 19:53:23下载
    积分:1
  • matlab-KPCA_KLPP
    说明:  改进核主成分分析,有数据,有算例,流形学习结合核主成分分析,自己编写,仅供参考(Improved core principal component analysis, data, examples, manifold learning combined with core principal component analysis, their own, for reference only)
    2021-03-24 14:39:15下载
    积分:1
  • C-CPP-header-file
    C-C++头文件一览是学习C/C++语言必要的资料,可以了解一些头文件的主要内容。(C-C++ header file list is to learn C/C++ language, the information necessary to understand some of the main contents of the header files.)
    2011-11-13 15:16:45下载
    积分:1
  • Digitalimageprocessingexamplesofafewprograms
    文件名称: 数字图像处理的几个程序例子.r下载 所属分类: 图形图象 开发工具: VC 文件大小: 3484 KB 上传时间: 2005-7-31 下载次数: 1 提 供 者: 李玲 详细介绍: 这是几个数字图像处理的程序实例,有经典的傅立叶变换和反变换、图像增强(中值滤波、增强光照)还有染色体计数。它们都是经典算法的实现。 (File Name: Digital image processing examples of a few programs. R download-owned Category: Graphic Image Development Tools: VC File Size: 3484 KB upload time: 2005-7-31 Downloads: 1 provider: Li Details: This is a few examples of digital image processing procedures, there is the classic Fourier transform and inverse transform, image enhancement (median filtering, to enhance light), there are chromosome counts. They are the classic algorithm.)
    2009-10-21 06:11:05下载
    积分:1
  • FILEMANIPULATE
    FileManipulate是一个基于对话框的MFC应用程序,实现了文件的删除、复制和移动等功能。(FileManipulate is a dialog-based MFC application that implements file to delete, copy and move functions.)
    2013-11-18 23:00:28下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载