登录
首页 » Java » Mypicture

Mypicture

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

  • Source Code for PIC24RF Co
    Source Code for PIC24RF Co-Coordinator Module
    2022-03-24 21:15:31下载
    积分:1
  • TemplateFunc
    第1章 Visual C++与面向对象技术概述TemplateFuncTemplateFunc.rar,很不错的vc源码,希望能对大家有所帮助(Chapter 1, Visual C++ object-oriented technology overview TemplateFunc TemplateFunc.rar, very good vc source code, I hope you can help)
    2016-07-13 09:54:07下载
    积分:1
  • Live_Easy_Motion_Detector_src
    motion detect on microsoft visual c++
    2009-05-17 13:03:25下载
    积分:1
  • Tut3
    SOUNDSC(Y,...) is the same as SOUND(Y,...) except the data is scaled so that the sound is played as loud as possible without clipping. The mean of the data is removed.(SOUNDSC (Y ,...) is the same as SOUND (Y, ...) except the data is scaled so that the sound i 's played as loud as possible without clipping. T he mean of the data is removed.)
    2007-06-03 20:37:26下载
    积分:1
  • Calculator
    用C++实现的可计算多位数的四则运算计算器,能够自动跳过空格(Implemented in C++ calculate the multi-digit arithmetic calculator that can automatically skip a space)
    2011-11-30 21:28:35下载
    积分:1
  • 8137
    post注册机源码,程序结合易语言扩展界面支持库、多线程支持库和互联网支持库,可以针对网站论坛循环注册。(Fillmore post source , the program combined with easy language support library expansion interface , multithreading support libraries and Internet support libraries , can be recycled registered for the website forum.)
    2015-09-21 18:59:09下载
    积分:1
  • 博金操盘手
    博金操盘手不错的交易系统,按照交易信号交易有不错的盈利(Bojin Traders have a good trading system, trading according to the trading signal has a good profit.)
    2020-06-24 20:20:01下载
    积分:1
  • addrs
    The following define the major position-independent aliases used in SN0. CALIAS Varies in size, points to the first n bytes of memory on the reader s node.
    2015-11-09 20:23:48下载
    积分:1
  • C++ShiyanYuShiXunSorceCode
    书籍《C++程序设计实验指导与实训》的原版配套代码(Books C++ Program design experimental guidance and Training in the original package code)
    2008-06-26 11:27:19下载
    积分:1
  • alpha
    基于C语言的Alpha稳定分布随机信号的产生方法。独一无二的源程序。(C language based on Alpha stable distribution, the method of random signals. Unique source.)
    2020-11-18 17:19:38下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载