登录
首页 » Java » Mypicture

Mypicture

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

  • NewApplet
    这个程序主要是用来显示日历的,可根据面板改变显示(This procedure is mainly used to display the calendar can be changed under the panel show)
    2008-01-12 16:24:25下载
    积分:1
  • journ
    excellent research journals! - a must have these papers!!
    2013-07-20 12:56:12下载
    积分:1
  • 使用Ras实现拨号管理
    使用Ras实现拨号管理 -Using Ras to implement dail management
    2022-01-25 20:49:08下载
    积分:1
  • TCP的客户服务器通信序 一:序运行过 1、运行服务器序,等待客户端发出请求 2、运行客户端序,输入客户的IP地址,请求连接 3、若连接成功,服务器端...
    TCP的客户服务器通信程序 一:程序运行过程 1、运行服务器程序,等待客户端发出请求 2、运行客户端程序,输入客户的IP地址,请求连接 3、若连接成功,服务器端显示客户的IP地址及端口号;客户端接收文件并保存在d:clientls.txt下,否则,显示错误信息。 二:程序实现原理 发送端:打开文件,逐一读取字符到缓冲区(缓冲区大小为1024),若文件大于1024,则成块发送;若小于,则直接发送。 接受端:与发送端同理。-TCP client-server communication program one : running a process, running the server and wait for the client to issue two requests, the client operating procedures, the importation of customer IP address, link request, if successful connection, the server-client shows the IP address and port number ; the client receives the document and preserve d : client ls.txt, otherwise an error message. 2 : Principle procedures transmitter : open the file, read each character to the buffer (buffer size for 1024), and if the document is greater than 1,024, then sent into pieces; If less, then sent directly. Receivers : Send-the same reason.
    2022-06-30 17:04:28下载
    积分:1
  • 外国人用vb写的ftp源代码,相当不错!
    外国人用vb写的ftp源代码,相当不错!-foreigners to use the ftp vb write source code, which is pretty good!
    2022-07-03 07:43:45下载
    积分:1
  • shellicon_demo
    从windows程序种查找图标资源,提取图标。(Find the icon resource the windows program, extract the icon.)
    2017-03-14 01:36:13下载
    积分:1
  • jfsms
    说明:  短信预付费平台源码,数据库基于SQLSERVER,含全套文档(The source code of the SMS prepaid platform, the database is based on SQLSERVER and contains a full set of documents)
    2020-06-27 09:25:30下载
    积分:1
  • Driver_Kit_SERVER_for_D113
    Duagon D113 MDFULL SERVER MVB PC104 source code
    2015-01-07 14:52:45下载
    积分:1
  • 虚拟示波器LPC例
    虚拟示波器历程 用于在线观察波形 智能车直立车专用(The course of virtual oscilloscope)
    2019-06-09 16:02:37下载
    积分:1
  • 使VB控件支持XP风格并需要要管理员权限运行
    使VB6的控件支持xp风格,并实现管理员权限运行!(Make VB6 control support XP style, and realize administrator privilege operation!)
    2020-06-21 08:00:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载