文件名称:test2
介绍说明--下载内容来自于网络,使用问题请自行百度
(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
test2/Sort.java
test2/Sortable.java
test2/Student.java
test2/TestSort.java
test2
test2/Sort.java
test2/Sortable.java
test2/Student.java
test2/TestSort.java
test2
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.