文件名称:inheritance
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:47.1kb
-
已下载: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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.