登录
首页 » Java » Mypicture

Mypicture

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

  • tabu-search
    An algorithm for tabu search methode for solving optimization problems
    2013-11-18 01:29:59下载
    积分:1
  • 这是万亩网上服务器的源代码!
    奇迹的重要组件源代码,有了它你可以扩展出奇迹很多功能!-This is the MU online server s source code!
    2022-12-18 13:25:03下载
    积分:1
  • Pioneer_DEH-605RDSa
    Pioneer_DEH-605RDSa good files
    2014-04-17 17:23:50下载
    积分:1
  • 45-70
    C语言精彩百例第45-70例 第二篇 深入提高篇 实例45 结构体变量 实例46 结构体数组 实例47 结构体指针变量 实例48 结构体指针数组 实例49 共用体变量 实例50 枚举类型 实例51 读写字符 实例52 读写字符串 实例53 格式化输出函数 实例54 格式化输入函数 实例55 打开和关闭文件 实例56 fputc()和fgetc() 实例57 函数rewind() 实例58 fread()和fwrite() 实例59 fprintf()和fscanf() 实例60 随机存取 实例61 错误处理 实例62 综合实例 实例63 动态分配函数 实例64 常用时间函数 实例65 转换函数 实例66 查找函数 实例67 跳转函数 实例68 排序函数 实例69 伪随机数生成 实例70 可变数目变元(err)
    2008-01-14 15:55:15下载
    积分:1
  • Tamura纹理
    基于opencv实现的求取Tamura纹理特征(To get Tamura texture features based on Opencv)
    2021-03-10 21:19:26下载
    积分:1
  • 常用的lanhelp,netsuper等软件都用过吧?自己也写一个?这是个不错的例子。...
    常用的lanhelp,netsuper等软件都用过吧?自己也写一个?这是个不错的例子。-common lanhelp, netsuper software has been used? One has written? This is a good example.
    2022-08-17 08:16:23下载
    积分:1
  • UsefulSUBs
    Useful Generic Excel Macro s
    2013-08-27 10:33:33下载
    积分:1
  • 序主要是作为一个客户端,基于TCP/IP协议实现信号的发送!...
    本程序主要是作为一个客户端,基于TCP/IP协议实现信号的发送!-This procedure is mainly as a client, based on TCP/IP protocol to send the signal!
    2022-03-24 06:04:25下载
    积分:1
  • OpenSTL
    MFC的小程序,打开文本的STL文件,并实现缩放、旋转、计算体积、表面积功能(MFC applet, open the text of STL file, and zoom in, rotate, calculate volume, surface area function)
    2015-08-28 23:00:29下载
    积分:1
  • pjsqeanddrag
    支持高级的拷贝粘贴和拖放功能,功能很强大(Support senior copy paste and drag and drop functionality, function is very powerful)
    2017-03-30 11:15:36下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载