- Category:
- Applet
- Tags:
-
[Java]
[源码]
- File Size:
- 2kb
- Update:
- 2015-12-07
- Downloads:
- 0 Times
- Uploaded by:
- halw
Description: (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.
To Search:
File list (Check if you may need any files):
test2\Rectangle.java
.....\Sort.java
.....\Sortable.java
.....\Student.java
.....\TestSort.java
test2