登录
首页 » Java » Mypicture

Mypicture

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

  • PEInfo(C++)
    简单的PE文件分析器,主要是得到PE文件的各项信息,仅供初学者使用。(Simple PE file analyzer, mainly to get PE file information, for beginners only.)
    2020-06-20 17:20:01下载
    积分:1
  • 从Python开始学
    本书以Python为样本,不仅介绍了编程的基本概念,还着重讲解了 编程语言的范式(面向过程、面向对象、面向函数),并把编程语言的 范式糅在Python中,让读者不仅学会Python,未来在学习其他编程语言 时也变得更加容易。(aking Python as a sample, this book not only introduces the basic concepts of programming, but also focuses on the programming language paradigm (process-oriented, object-oriented, function-oriented), and incorporates the programming language paradigm into Python, so that readers can not only learn Python, but also become easier to learn other programming languages in the future.)
    2020-06-18 03:00:02下载
    积分:1
  • 鼠标、光标控制函数
    鼠标、光标控制函数(mouse, the cursor control function)
    2004-12-19 23:09:41下载
    积分:1
  • winSockUdp写了UDP客户端和服务端案例,同时也有TCP通讯连路例,希望对网络用户有所帮助。...
    winSockUdp程序编写了UDP客户端和服务端案例,同时也有TCP通讯连路例程,希望对网络编程用户有所帮助。-winsockudp include UDP client and UDP server example
    2023-02-08 16:10:03下载
    积分:1
  • OPENH323源码分析资料,是学习h323协议的好资料
    OPENH323源码分析资料,是学习h323协议的好资料-OpenH323 source code analysis, is to learn a good deal of information h323
    2022-02-02 14:02:58下载
    积分:1
  • cloud-computing-task-scheduling-master
    说明:  这个文件夹里有很多对云任务分配的算法 例如PSO、FCFS、SJF等(There are many cloud task allocation algorithms in this folder, such as PSO, FCFS, SJF, etc.)
    2019-05-15 09:08:34下载
    积分:1
  • cmpp协议短信网关Delphi源码,采用DELPHI开发!
    cmpp协议短信网关Delphi源码,采用DELPHI开发!-cmpp agreement SMS Gateway Delphi source, using DELPHI!
    2022-02-03 16:59:20下载
    积分:1
  • MyNotepad
    java编程实现的记事本功能,有字体大小设置和颜色设置,查找替换等功能(java programming in notepad, a font size and color settings, find and replace functions)
    2011-12-29 21:19:04下载
    积分:1
  • 这是个用C SHARP 写的C/S结构的网络聊天室,支持多客户端连接,适合初学者学习...
    这是个用C SHARP 写的C/S结构的网络聊天室,支持多客户端连接,适合初学者学习-This is written in C SHARP C/S structure of the Internet chat rooms, support multi-client, suitable for beginners to learn
    2023-03-25 01:40:04下载
    积分:1
  • MiniCAD
    在这个项目中,你应该使用Java GUI实现一个简单的绘图板。 为了得到满分,你应该落实: 画线,圆,矩形,文字 改变目标的颜色 改变的目标的位置 改变的目标的大小 图像保存为文件,并加载镜像文件 变化的全部进程应该是可见的。 您应提交所有的源文件可运行jar文件( In this project, you should use Java GUI to implement a simple drawing board. To get full marks, you should implement to: draw line, circle, rectangle, text change the color of a target change the position of a targets change the size of a targets save images as files and load a image file All processes of changes should be visible. You should submit a runnable jar file with all your source files )
    2020-11-06 22:09:49下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载