登录
首页 » Java » Mypicture

Mypicture

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

  • FilePermission
    File Permission extends Permission implements Serializable Source Code for Andriod.
    2014-01-01 21:18:02下载
    积分:1
  • perfmon_itanium
    This file contains the Itanium PMU register description tables and pmc checker used by perfmon.c.
    2014-08-08 11:27:28下载
    积分:1
  • JGroups
    JGroups多播通讯实现小功能实验。基于组播通信开发一个应用程序(接收方对收到字符串并进行大小写转换)。(Communication realization of small function in experimental JGroups multicast. Multicast communication to develop an application based on (the receiver to receive a string and case conversion).)
    2014-03-30 22:12:46下载
    积分:1
  • keras-master
    最近一直在用keras,说点个人感受。 1、keras根植于python及theano,人气比较旺。 2、提供较为上层的框架,搞个深度学习的原型非常方便。 3、更新很快,我记得几个月前还没有multi-task的能力,最近再查就提供了graph的对象。 4、最重要的,文档很全。这点超过其它类似的基于theano的框架(Lasagne, Opendeep, Blocks)(Keras is a high-level neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast )
    2016-11-28 14:39:37下载
    积分:1
  • ntservicecpl
    用 C++ 创建简单的 Win32 服务程序(NTServCpl) 详细信息 < NT服务 > 《用 C++ 创建简单的 Win32 服务程序》一文的例子代码。描述如何用 Visual C++ 创建 Windows NT 服务程序。创建该服务仅用到一个 C++ 类,这个类提供服务与操作系统之间一个简单的接口。使用这个类实现自己的服务非常简单,只要改写少数几个基类中的虚拟函数即可。文中有三个源代码参考例子:这是其中之一—— NTServCpl:是一个控制面版程序,用来控制 NTService 服务; 其余两个分别为: NTService:是一个简单的 Win32 服务,它就是用本文所描述的方法建立的; NTServCtrl:是一个独立的程序例子,用它可以监控某个 Win32 服务;(create simple Win32 services (NTServCpl) detailed information lt; NT services gt; "C create simple Win32 service procedures," a text of the code examples. Describe how to use Visual C create Windows NT service procedures. Creation of the service only to a category C, the category of services provided between an operating system with a simple interface. Use this category to realize their services are very simple, as long as rewriting a few of the base class function can be virtual. The text has three reference source code example : This is one of them-- NTServCpl : console is a procedure used to control NTService services; The remaining two were : NTService : is a simple Win32 service, which is described in this paper with the method; NTServCtrl : one is independent the procedure)
    2005-05-06 22:54:00下载
    积分:1
  • 2003819926451
    包过滤路由器与包过滤防火墙具有同一功能,如2。1。1部分所述。 The packet filter rout provide the same functionality as the packet filter firewall describe in section2.1.1. 代理防火墙比包过滤器防火墙易于保持更多的上下文 The proxy firewall maintain context more easily than the packet filter firewall. 防火墙计算机要求2张以太网卡,一个对外部世界的接口和一个对主POP网络的接口。 The firewall machine will require two ethernet card, one interface to the outside world and one to the master pop network. (The firewall machine will require two ethernet card, one interface to the outside world and one to the master pop network. )
    2009-10-08 17:45:44下载
    积分:1
  • SumCode
    测试函数行数,计算每个合格的java文本的函数行数(sum code)
    2012-05-06 09:59:57下载
    积分:1
  • A10_Adv
    A10飞机大战游戏原代码 VC开发,画面很不错(A10 ?机)
    2008-08-25 22:46:32下载
    积分:1
  • word-change
    接收从键盘输入的字符串(字符串中包含数字、大写字符、小写字符及标点符号等等,字符串以回车符作为结束符),编写程序将其中的小写字符转换成大写字符,然后将转换后的字符串显示在屏幕上。(Receiving (string contains numbers, uppercase characters, lowercase characters and punctuation marks, etc., as the end string carriage return character) a string of keyboard input, write a program in which lowercase characters to uppercase characters, and then the converted string is displayed on the screen.)
    2016-06-19 08:59:19下载
    积分:1
  • 据说能拦截局域网内所有数据包,我自己使用过一下感觉好象有些部份数据包拦不下来。...
    据说能拦截局域网内所有数据包,我自己使用过一下感觉好象有些部份数据包拦不下来。-reportedly LAN can intercept data packets all, I used what seemed to feel some part of the data packets to stop for long.
    2023-04-17 17:55:03下载
    积分:1
  • 696518资源总数
  • 105417会员总数
  • 32今日下载