登录
首页 » Java » graphics

graphics

于 2014-05-05 发布 文件大小:2KB
0 348
下载积分: 1 下载次数: 1

代码说明:

  实验一:类与对象实验: 几何图形类的设计 实验目的:掌握用类进行面向对象程序设计的方法,掌握使用对象作为类的成员变量,掌握方法的参数传递,掌握静态域和静态方法。 实验内容:编写4个类:Rectangle、Circle、Geometry、Exa,具体要求如下: ① Rectangle类有double型成员变量表示矩形左上角的位置坐标及矩形的宽和高,要求提供修改和返回各成员变量的方法。 ② Circle类有double型成员变量表示圆心坐标和圆的半径,要求提供修改和返回各成员变量的方法。 ③ Geometry类有Rectangle类和Circle型的成员变量rect和circle。即Geometry类创建的对象由一个矩形和一个圆组合而成。要求该类提供修改rect、circle位置和大小的方法;提供显示rect和circle位置关系的方法,并能够显示圆是否完全坐落于矩形中。 ④ 要求能对创建的Rectangle类和Circle类对象数目进行统计。 Exa类含有main方法,在main方法中用Geometry类创建对象,该对象调用相应的方法 设置圆和矩形的位置及大小并输出圆是否包含在矩形中。输出当前Rectangle和Circle 对象数目。 (test one)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • stackaqueue
    java 实现的基础数据结构栈和队列,仅供有需要的同学参考(java code of stack and queue )
    2014-03-25 13:21:37下载
    积分:1
  • arts_debug
     调试对于软件的成败至关重要,正确使用恰当的调试工具可以提高发现和改正错误的效率。本书详细介绍了 3种调试器,gdb用于逐行跟踪程序、设置断点、检查变量以及查看特定时间程序的执行情况, ddd是流行的 gdb的 gui前端,而 eclipse提供完整的集成开发环境。书中不但配合实例讨论了如何管理内存、理解转储内存、跟踪程序找出错误等内容,更涵盖了其他同类书忽略的主题,例如线程、客户 /服务器、gui和并行程序,以及如何躲开常见的调试陷阱。(Debugging for is vital to the success of the software, the proper use of appropriate debugging tool can improve the efficiency of discovery and correct mistakes. Book introduces in detail three kinds of debugger, GDB for tracking procedures, set breakpoints, line by line check variables and checking their specific time execution of DDD is popular the GDB GUI front-end, and eclipse provides a complete integrated development environment. The book not only cooperate with examples to discuss how to manage the memory, understanding, memory dump and trace program error, more covers other similar books ignore themes, such as threads, client/server, GUI, and the parallel program, debugging and how to avoid common pitfalls.)
    2013-08-03 14:53:53下载
    积分:1
  • DataTool
    对多种数据进行格式转换,方便快捷。如时间数据整型与字符串互转,16进制10进制互转,IP数据整型与字符串互转等。(For a variety of data format conversion, and convenient. Time data such as integer and string conversion, hex decimal system conversion, IP data conversion between integer and string and so on.)
    2014-11-05 17:48:22下载
    积分:1
  • introduction-to-rsoft
    一份rsoft 光波导模拟软件的使用说明书!有实例讲解。简单易懂(an introduction of rsoft with examples,it is eazy to understand!)
    2012-05-05 14:20:11下载
    积分:1
  • 此程序为外部升级程序(需要主程序的调用),具体代码这里就不罗列了,还是自己看源代码吧.此程序主要的思路是通过读取服务器文件获得升级版本及升级地址,有新版本则下载
    此程序为外部升级程序(需要主程序的调用),具体代码这里就不罗列了,还是自己看源代码吧.此程序主要的思路是通过读取服务器文件获得升级版本及升级地址,有新版本则下载 如果想做成内部升级程序(在主程序内部自动检测及自动升级),只需要在主程序启动时相关的代码即可,大家不仿试试,主要的思路与这个是差不多的,不同之处是怎么处理主程序的自动关闭与启动问题.-This program is an external upgrade (requires the main program call), the specific code is not listed here, or to look up the source code for it. The main idea of this procedure is obtained by reading the file server upgrade and update address, a new version If you want to get inside is to download the upgrade process (in the main program within the auto-detection and auto-upgrade), just start in the main program code can be related, we do not try to imitate, the main idea and this is about the same, different The Department is how to deal with the main program automatically shut down and startup problems.
    2022-06-17 12:40:28下载
    积分:1
  • C language TRACE routing tracking, using ICMP agreement. Build environment : Mic...
    C语言跟踪路由跟踪,使用ICMP协议。生成环境:Microsoft Visual C 6.0 WinSock2。
    2022-05-13 15:46:39下载
    积分:1
  • 存量房
    股票实时数据控件是标准的OCX控件,提供实时的沪深股票数据,数据来自各种数据接口,如银江、数畅等。股票实时数据控件是国内第一款股票数据的ocx控件,可以用在支持Activex的所有语言上。-Stock real-time data control is a standard OCX control, Shanghai and Shenzhen to provide real-time stock data, data from a variety of data interfaces, such as the Silver River, a few smooth and so on. Stock real-time data control is China" s first stock data, ocx control, can be used in support of Activex in all language.
    2023-01-06 13:50:03下载
    积分:1
  • PCtoLCD2002wmb
    图片、文字转LCD点阵,已经编译好,源文件暂不开放(Pictures, text to LCD dot matrix, has been compiled, source files are not open yet)
    2020-06-21 18:20:02下载
    积分:1
  • java-chat
    j​ a​ v​ a​ 聊​ 天​ 程​ 序​ 源​ 代​ 码(java chat program source code)
    2014-04-17 11:56:03下载
    积分:1
  • Visio_2019_64bit
    说明:  This is a Visio file. Please do not change or abuse it
    2020-05-08 09:11:31下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载