登录
首页 » Java » Mypicture

Mypicture

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

  • 65520803trace
    五种飞行轨迹,轨迹中包含各种飞行姿态,适合初学者。(Five Kinds of Flight Trajectories)
    2020-06-23 18:40:01下载
    积分:1
  • Csoucecode
    该文件包含C语言当中的常用算法源码,如单元加,底层编码,汉诺塔,逆阵,数据结构里面的很多重要的算法源码,是精通C的必备。(This file contains C language source code among the commonly used algorithms, such as the cell increases, the underlying code, Tower of Hanoi, inverse matrix, many important data structures inside the algorithm source code, is proficient in C essential.)
    2008-07-19 10:03:11下载
    积分:1
  • pcm
    说明:  此MATLAB 函数 对 data 进行编码,并返回 JSON 格式的字符向量。... jsonencode 会将MATLAB 数据类型转换为下表中列出的 JSON 数据类型。 MATLAB 数据类型 JSON 数(This MATLAB function encodes data and returns the character vector in JSON format. Jsonencode converts the MATLAB data type to the JSON data type listed in the following table. JSON Number of Data Type in MATLAB)
    2019-06-19 09:27:32下载
    积分:1
  • TestPolymoph
    这段代码是用来理解 polymorphism 多态,写的很详细,适合初学者!(This code is used to understand the polymorphism polymorphism, written in great detail, suitable for beginners!)
    2010-08-15 09:23:33下载
    积分:1
  • jsoncpp
    vulfhf;hfiuvbibu44848919189
    2020-06-23 17:20:02下载
    积分:1
  • IGDWN0
    这也是我们学完java之后的一个大型的作业,有用得着的可以拿去看看()
    2018-06-01 09:58:23下载
    积分:1
  • 辑距离问题
    说明:  设A和B是2个字符串。要用最少的字符操作将字符串A转换为字符串B。这里所说的字符操作包括:1)删除一个字符;2)插入一个字符;3)将一个字符改为另一个字符。将字符串A变换为字符串B所用的最少字符操作称为字符串A到B的编辑距离,记为d(A,B)(Let A and B be two strings. String A is converted to string B with the least number of character operations. The character operations mentioned here include: 1) deleting a character; 2) inserting a character; 3) changing one character to another character. The minimum character operation used to convert string A to string B is called the editing distance from string A to B, which is denoted D D as D (A, B).)
    2019-05-29 15:41:34下载
    积分:1
  • Win7ElevateV2_Source
    了rundll32注入提升权限从而绕过UAC的方法,你可以让rundll32通过加载dll来执行你的代码
    2010-06-08 14:48:38下载
    积分:1
  • Tree
    Implementation of Tree in C++ .
    2014-02-06 15:40:47下载
    积分:1
  • diliver
    本程序采用NI公司Labwindows CVI 开发平台,分为数据发送和数据接收两部分,数据发送部分发送一个字符串,数据接收部分接收数据发送部分发送的字符串。 (This procedure using NI companies Labwindows CVI development platform, the data sent and data is divided into two parts to receive the data sent in part to send a string, data receiving part receiving data sent in part to send the string.)
    2008-07-09 17:57:27下载
    积分:1
  • 696524资源总数
  • 103801会员总数
  • 61今日下载