登录
首页 » Java » Mypicture

Mypicture

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

  • javaautomate
    java files for automate re to nfa
    2012-04-10 20:46:50下载
    积分:1
  • (2)本地计算机网络接入计算机实例…
    (2)本地计算机网络编程实例 获取计算机的名称和IP地址【chap2Local】 获取计算机的子网掩码【chap2 Local】 获取计算机的DNS设置【chap2 Local】 获取计算机的网卡地址【chap2 Local】 获取计算机安装的协议【chap2 Local】 获取计算机提供的服务【chap2 Local】 获取计算机的所有网络资源【chap2 Local】 修改本地计算机的所有网络设置【chap2 Local】 获取计算机TCP/IP协议的所有信息【chap2 Local】-(2) the local computer network access to computer programming examples of the names and IP addresses [ chap2 L ocal access to a computer-- Subnet Mask [ chap2 Local access to a computer-- installed DNS [ chap2 Local access to the computer-- the NIC address [ chap2 Local access-- the installation of computer [the agreement chap2 Local computer-- access services provided by the [ chap2 Local access to a computer-- all network resources [ chap2 Local-- amend local computer all network configuration [ chap2 Local computer-- access TCP/IP protocol all the information [ chap2 Local--
    2023-06-02 01:25:03下载
    积分:1
  • CameraCon
    用于摄像机云台控制的类库,支持Pelco P和D协议,可以方便开发人员扩展。(For the camera pan and tilt control, libraries, support Pelco P and D protocol, developers can easily expand.)
    2009-09-16 19:11:09下载
    积分:1
  • 服务器和客户端的VC++实例
    服务器和客户端的VC++实例-server and client examples of the VC
    2022-07-10 17:49:03下载
    积分:1
  • 蚁群算法求解VRPTW问题matlab代码
    说明:  用于车辆路径问题优化,提高物流运输路线效率,节省成本(It can be used to optimize the vehicle routing problem, improve the efficiency of logistics transportation routes and save costs)
    2020-08-23 14:18:23下载
    积分:1
  • MCTK-2.1.11
    说明:  MCTK分享。IDL中批量处理影像插件分享(MCTK Plug in sharing of batch image processing in IDL)
    2021-02-23 10:49:43下载
    积分:1
  • 遗传算法兰伯特变轨优化
    兰伯特变轨用遗传算法优化,效率较高,内含差分进化验证(Genetic Algorithms for Lambert Transfer)
    2019-06-10 09:03:36下载
    积分:1
  • JAVA-RMI-
    远程控制的实例,对了解远程控制有极大的帮助。(Instance of the remote control, remote control on the understanding of great help.)
    2011-05-24 09:01:25下载
    积分:1
  • sinDraw
    java手机开发编程语言java2me范例,绘制sin函数。(java programming language java2me mobile development paradigm, drawing sin function.)
    2013-11-03 21:16:03下载
    积分:1
  • Copy-of-CallReminder
    漏电提醒,可以匹配通讯录,其实里面是两个内容,有未接和无服务时从服务商短信发过来的,两种,这个程序里监听的是电信的漏电短信。(Leakage reminder, you can match the address book, in fact, there are two elements, there are missed, and when there is no service the service providers send messages over two, this program is to monitor telecommunications leakage SMS.)
    2015-02-06 15:51:32下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载