登录
首页 » Java » Mypicture

Mypicture

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

  • angendaService
    议程服务系统,可以添加查看删除议程 用javarmi实现(agendaservice system )
    2009-05-11 18:02:07下载
    积分:1
  • Gen_Quartus_Vwf_Mif
    最大特点:可以从文件中导入数据到mif文件中,从文件中导入数据到vwf文件的输入总线中。 对于在QuartusII中做前期仿真,特别是对算法程序的仿真尤其有用。 自己做的,识货的下一个试试,别忘了顶一个先。 有任何建议和改进意见,请发mail到xyzlty@163.com (greatest features : from paper imported data to mif document, from the paper into data to the input document vwf Bus. QuartusII in doing preliminary simulation, particularly for the simulation algorithm procedure is particularly useful. Do for myself, recognizes the next try, do not forget that the top one first. Have any suggestions and improvements, please send mail to xyzlty@163.com)
    2007-05-29 11:47:18下载
    积分:1
  • Safety_Features_of_NEC_Electronics
    说明:  
    2009-05-29 16:31:03下载
    积分:1
  • 利用Optiwave softwave进行FBG补偿仿真
    说明:  利用Optiwave softwave进行FBG补偿仿真(FBG Compensation Simulation Using Optiwave Softwave)
    2020-06-22 02:20:01下载
    积分:1
  • 直接用winsock api实现寻呼功能 支持完全自控的聊天服务。支持中国联通,河北国信,万声寻呼,中铁寻呼,斯壮寻呼,国讯寻呼等主要干线...
    直接用winsock api实现寻呼功能 支持完全自控的聊天服务。支持中国联通,河北国信,万声寻呼,中铁寻呼,斯壮寻呼,国讯寻呼等主要干线-Realize the direct use of winsock api paging features fully automatic control of the chat support service. Support of China Unicom, Hebei Guoxin, million voice paging, iron paging, Sizhuang paging, paging inquiry States and other major trunk
    2022-02-28 15:52:54下载
    积分:1
  • Modbus 主机 C#
    modbus 上位机工程 C# 工程实例(modbus Windows C# Project)
    2017-09-25 17:23:59下载
    积分:1
  • Regular_Expressions
    一篇学习正则表达式得好文档,希望对大家有帮助.(A good document to learn regular expressions, I hope it will help you.)
    2010-09-18 17:10:52下载
    积分:1
  • 介绍了Winsock的工作原理及工作流,结合有线电视网络运营公司的实际情况,设计了一种基于Winsoek的代收费业务网络系统,并给出了关键源代码及在某网络运营...
    介绍了Winsock的工作原理及工作流程,结合有线电视网络运营公司的实际情况,设计了一种基于Winsoek的代收费业务网络系统,并给出了关键源代码及在某网络运营公司的实际运行情况.-Introduced the working principle of Winsock and workflow, combined with the cable television network operator the actual situation, design a Winsoek in lieu of charges based on the business network system, and gives a key source code and a network of operating companies in the actual running situation.
    2022-01-24 12:25:52下载
    积分:1
  • MES加工装配系统
    说明:  菜单功能 系统功能: 一、服务端 1、基础档案:产品档案、物料档案、工序、工位、工艺路线 2、计划管理:加工计划、装配计划 3、看板:加工实时看板、装配实时看板 4、数据初始化 5、标签初始化工具 6、服务端实时监听服务 二、客户端 1、加工过程控制 2、加工搬运过程控制 3、装配过程控制 4、装配搬运过程控制 5、加工装配质量(异常)处理 核心逻辑代理请通过数据库存储过程查阅。 注意事项 1、开发环境为Visual Studio 2010,数据库为SQLServer2008R2,使用.net 4.0开发。 2、DB文件夹中是数据库文件,附加即可 3、《SimpleMES加工装配模拟系统》设计说明书在Doc文件夹中。(Menu function 1. Basic file: product file, material file, process, work station and process route)
    2020-07-10 20:46:21下载
    积分:1
  • cg-fft
    This software gave volume MoM solution by the CG-FFT method(volume solution by using MoM t he CG-FFT method)
    2007-03-31 10:21:57下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载