文件名称:inheritance
- 所属分类:
- Internet/网络编程
- 资源属性:
- [WORD]
- 上传时间:
- 2012-11-26
- 文件大小:
- 47kb
- 下载次数:
- 0次
- 提 供 者:
- 陈*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个抽象类Shape,包括2个抽象方法,分别是计算形状的周长和面积。设计具体类Rectangle和Circle,分别表示矩形和圆,它们都是Shapes的子类。使Rectangle和 Circle都实现Comparable接口。编写一个通用的排序程序和一个通用的二分查找程序(自己写代码实现),能对这二种类型的数组进行排序并查找指定的对象。-Design an abstract class Shape, including the two abstract methods, namely, calculation of the shape of the perimeter and area. Design of concrete class Rectangle and Circle, respectively rectangular and circular, and they are the Shapes of the subclass. So that Rectangle and Circle are the realization of Comparable interface. The preparation of a generic sort procedure and a generic binary search procedures (write their own code), will give two kinds of types of arrays to sort and find the specified object.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
inheritance.doc