登录
首页 » Java » Mypicture

Mypicture

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

  • 一个p2p的原代码,socket的建立连接在p2p方面的实现.p2p不再神秘
    一个p2p的原代码,socket的建立连接在p2p方面的实现.p2p不再神秘-one of the original code, the socket connects to the peer-to-peer connection is achieved. p2p no longer mysterious
    2023-06-06 12:35:03下载
    积分:1
  • 郭尚波Jave聊天室
    这是我的Java课程设计,在JBuilder9下开发的。作者:郭尚波 内蒙古农业大学计算机与信息工程学院 2001级计算机科学与技术2班(This is my Java curriculum design, in JBuilder9 under development. Author : Guochangbei Inner Mongolia Agricultural University of Computer and Information Engineering College 2001 Computer Science and Technology 2 classes)
    2004-11-20 11:26:54下载
    积分:1
  • auto_loading_send
    VB程式碼,可以和RS232串列通訊做結合,加以利用和Com port互動(VB code, and RS232 serial communication done with, and use interactive Com port)
    2007-05-20 03:39:51下载
    积分:1
  • MFC开发的聊天室,有server和client 支持多人聊天 适合MFC开发者学习和使用...
    MFC开发的聊天室,有server和client 支持多人聊天 适合MFC开发者学习和使用- a chat room developed in mfc support multi_person chating
    2023-05-08 18:30:03下载
    积分:1
  • x79-16d-drivers
    说明:  Hunanzhi X79-16D drivers for chipset components intel 2011
    2020-06-19 18:20:01下载
    积分:1
  • C++ 磁盘格式化类+示例
    说明:  硬盘格式化,里面详细说明硬盘如何格式化,怎么调用api函数,有UI,可操作(Hard disk formatting, which details how hard disk formatting, how to call API functions, UI, operable)
    2020-06-16 01:40:01下载
    积分:1
  • topic 1 american dream
    american dream slides
    2019-05-17 19:20:01下载
    积分:1
  • volutionalgorihm
    微分进化算法的一套实用程序,适合学习微分进化算法的朋友研究(A set of differential evolution algorithm utility for the study of differential evolution algorithm research friend)
    2009-04-14 08:42:35下载
    积分:1
  • 八皇后
    数据结构上机作业 :八皇后c++程序代码。附实验截图(Data structure job: eight empress program)
    2018-01-16 12:13:18下载
    积分:1
  • cma_rigth
    这个是盲均衡算法的matlab仿真功能代码,分析了接收机信号经盲均衡算法后,有效提升接收机性能,具有一定的参考价值(This is a blind equalization algorithm matlab simulation function code, analysis of the receiver signal by the blind equalization algorithm, effectively improve the receiver performance, with a certain reference value)
    2017-04-07 15:46:49下载
    积分:1
  • 696518资源总数
  • 105714会员总数
  • 27今日下载