文件名称:test2
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2015-12-07
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- h***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
(1)定义一个接口Sortalbe,包括一个抽象方法int Compare( Sortble s),表示需要进行比较大小,返回大于0则表示大于。
(2)定义一个类Student,要求实现此接口,必须重写接口中的抽象方法。Student类中包括score属性,重写public String toString()方法,在比较大小时按照成绩的高低比较。
(3)定义一个类Rectangle,要求实现此接口,必须重写接口中的抽象方法。Rectange类中包括length,width属性,同时包括相应的构造方法,int area(),重写public String toString()方法;在比较大小时按照面积的大小进行比较。
(4)定义一个Sort类,其中定义方法public static void SelectSort(Sortalbe [] a)按照选择方法进行降序或升序排序。
-(1) defines an interface Sortalbe, including an abstract method int Compare (Sortble s), expressed the need to compare the size and returns greater than 0 means greater than.
(2) the definition of a class Student, required to achieve this interface, you must override abstract methods interface. Student category includes score attribute rewrite public String toString () method, in comparison size comparison according to the level of achievement.
(3) define a class Rectangle, required to achieve this interface, you must override abstract methods interface. Rectange class includes length, width property, also includes the appropriate construction method, int area (), rewrite public String toString () method in comparison to compare the size according to the size of the area.
(4) defines a Sort class, which defines the method public static void SelectSort (Sortalbe [] a) in accordance with the selection method in descending or ascending order.
(2)定义一个类Student,要求实现此接口,必须重写接口中的抽象方法。Student类中包括score属性,重写public String toString()方法,在比较大小时按照成绩的高低比较。
(3)定义一个类Rectangle,要求实现此接口,必须重写接口中的抽象方法。Rectange类中包括length,width属性,同时包括相应的构造方法,int area(),重写public String toString()方法;在比较大小时按照面积的大小进行比较。
(4)定义一个Sort类,其中定义方法public static void SelectSort(Sortalbe [] a)按照选择方法进行降序或升序排序。
-(1) defines an interface Sortalbe, including an abstract method int Compare (Sortble s), expressed the need to compare the size and returns greater than 0 means greater than.
(2) the definition of a class Student, required to achieve this interface, you must override abstract methods interface. Student category includes score attribute rewrite public String toString () method, in comparison size comparison according to the level of achievement.
(3) define a class Rectangle, required to achieve this interface, you must override abstract methods interface. Rectange class includes length, width property, also includes the appropriate construction method, int area (), rewrite public String toString () method in comparison to compare the size according to the size of the area.
(4) defines a Sort class, which defines the method public static void SelectSort (Sortalbe [] a) in accordance with the selection method in descending or ascending order.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
test2\Rectangle.java
.....\Sort.java
.....\Sortable.java
.....\Student.java
.....\TestSort.java
test2