登录
首页 » Java » Mypicture

Mypicture

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

  • ext
    ext-2.1(网络系统),2.1版本,可以在web上摸拟一个桌面系统,使用简单,是一个简单的windows系统,不需要配置服务器。-ext-2.1 (Network Systems), Version 2.1, you can web on a desktop system simulation, using simple, is a simple windows system with no need to configure the server.
    2023-01-22 06:10:04下载
    积分:1
  • C#聊天序!
    C#聊天程序!-C# chat program !
    2023-08-07 16:55:03下载
    积分:1
  • fenyou
    现有8升、5升、3升的容器各一个,均无任何度量标记,其中8升的容器装满油,其他两个为空。要求用上述容器倒来倒去,分成两份4升的油。(内附实验报告)(Existing eight liters, 5 liters, each a 3-liter container, no any measure mark, eight liter container filled with oil, the other two are empty. Requirements for the container shuffling back and forth, divided into two four liters of oil.)
    2015-11-15 17:54:53下载
    积分:1
  • 在应用层进行加密处理的VPN源代码,支持Windows平台和Linux平台。...
    在应用层进行加密处理的VPN源代码,支持Windows平台和Linux平台。-in the application layer VPN encryption source code, support for Windows and Linux platforms.
    2022-10-04 03:10:03下载
    积分:1
  • 这是一个简单的TCP客户端序,对入门者不错的哦
    这是一个简单的TCP客户端程序,对入门者不错的哦-This is a simple TCP client to beginners oh good
    2022-08-14 18:26:44下载
    积分:1
  • 11
    说明:  javaWeb微信支付 支付宝支付 银联支付.zip java版支付宝网站集成代码实例及详解 UTF.zip 银联支付接口文档和demo.zip java 银联网站支付接口.txt(JavaWeb microblog payment Alipay pay CUP payment Java version of the Alipay site integration code examples and explain UTF.zip CUP payment interface documentation and demo.zip Java CUP website payment interface)
    2016-11-06 16:08:27下载
    积分:1
  • steganography
    stenography project using java. hiding data in image.
    2011-11-04 06:11:09下载
    积分:1
  • Database-Connectivity-operation
    使用JDBC提供的API以JDBC-ODBC桥接器的方式连接数据库,并与数据库进行信息交互,数据的查询、更新、插入、删除等(Use API JDBC provides JDBC-ODBC bridge to connect the , and information interact with the , data query, update, insert, delete, etc.)
    2016-08-12 18:10:18下载
    积分:1
  • 多项式
    说明:  用链表实现多项式的加减乘除以及多项式的打印显示(Addition, subtraction, multiplication, division and display of polynomials by linked list)
    2019-05-19 08:17:30下载
    积分:1
  • diagchar_core
    Qualcomm Diag Driver
    2014-02-21 02:55:04下载
    积分:1
  • 696522资源总数
  • 104040会员总数
  • 35今日下载