Dear Campbell Ritchie and Steve Luke,
The program 'HorseTraderOrder' runs like the 'JavaComparatorExample' program did - it was a misplacement of the curly brackets (flukes (?)) in my 'Horse' program that rendered PercentageComparator inaccessible.
I got it to compile and run - and output in order as below :-
Giving the following output (to input to gui):-
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>cd c:\Java\Java Six
C:\Java\Java Six>set PATH=C:\Sun\AppServer\jdk1.6.0_05\bin;%PATH%
C:\Java\Java Six>javac Horse.java
C:\Java\Java Six>javac HorseTraderOrder.java
C:\Java\Java Six>java HorseTraderOrder
Spring Dream has: 3.0
Rose Row has: 3.0
Bassinet has: 3.0
Adage has: 3.0
Gamesters Lady has: 1.0
Never Pink has: 1.0
Queen Excalibur has: 1.0
Total points = 15.0
Spring Dream has: 20.0 % of points
Rose Row has: 20.0 % of points
Bassinet has: 20.0 % of points
Adage has: 20.0 % of points
Gamesters Lady has: 6.666666666666667 % of points
Never Pink has: 6.666666666666667 % of points
Queen Excalibur has: 6.666666666666667 % of points
Spring Dream came 2 gets: 3 points
Spring Dream came 0 gets: 0 points
Rose Row came 1 gets: 5 points
Rose Row came 5 gets: 0 points
Bassinet came 3 gets: 2 points
Bassinet came 3 gets: 2 points
Adage came 4 gets: 1 points
Adage came 6 gets: 0 points
Gamesters Lady came 4 gets: 1 points
Gamesters Lady came 0 gets: 0 points
Never Pink came 6 gets: 0 points
Never Pink came 0 gets: 0 points
Queen Excalibur came 0 gets: 0 points
Queen Excalibur came 9 gets: 0 points
Spring Dream overall got place points of 3
Rose Row overall got place points of 5
Bassinet overall got place points of 4
Adage overall got place points of 1
Gamesters Lady overall got place points of 1
Never Pink overall got place points of 0
Queen Excalibur overall got place points of 0
Overall points are:- 14.0
Spring Dream's TotalPoints are: - 3.0
Rose Row's TotalPoints are: - 5.0
Bassinet's TotalPoints are: - 4.0
Adage's TotalPoints are: - 1.0
Gamesters Lady's TotalPoints are: - 1.0
Never Pink's TotalPoints are: - 0.0
Queen Excalibur's TotalPoints are: - 0.0
Spring Dream has point percentage of 21.428571428571427
Rose Row has point percentage of 35.714285714285715
Bassinet has point percentage of 28.57142857142857
Adage has point percentage of 7.142857142857142
Gamesters Lady has point percentage of 7.142857142857142
Never Pink has point percentage of 0.0
Queen Excalibur has point percentage of 0.0
Spring Dream's Course and Distance total is: 1.0
Rose Row's Course and Distance total is: 3.0
Bassinet's Course and Distance total is: 1.0
Adage's Course and Distance total is: 1.0
Gamesters Lady's Course and Distance total is: 1.0
Never Pink's Course and Distance total is: 1.0
Queen Excalibur's Course and Distance total is: 0.0
Total for course and distance 8.0
Course and Distance percentage for Spring Dream is 12.5
Course and Distance percentage for Rose Row is 37.5
Course and Distance percentage for Bassinet is 12.5
Course and Distance percentage for Adage is 12.5
Course and Distance percentage for Gamesters Lady is 12.5
Course and Distance percentage for Never Pink is 12.5
Course and Distance percentage for Queen Excalibur is 0.0
Spring Dream gets 61.53846153846154 tips percentage
Rose Row gets 15.384615384615385 tips percentage
Bassinet gets 7.6923076923076925 tips percentage
Adage gets 7.6923076923076925 tips percentage
Gamesters Lady gets 0.0 tips percentage
Never Pink gets 7.6923076923076925 tips percentage
Queen Excalibur gets 0.0 tips percentage
Spring Dream gets Overall percentage of 115.46703296703296
Rose Row gets Overall percentage of 108.5989010989011
Bassinet gets Overall percentage of 68.76373626373626
Adage gets Overall percentage of 47.33516483516483
Gamesters Lady gets Overall percentage of 26.30952380952381
Never Pink gets Overall percentage of 26.858974358974358
Queen Excalibur gets Overall percentage of 6.666666666666667
Horses in ascending/descending order of percentages given
HorseQueen Excaliburhas6.666666666666667 points
HorseGamesters Ladyhas26.30952380952381 points
HorseNever Pinkhas26.858974358974358 points
HorseAdagehas47.33516483516483 points
HorseBassinethas68.76373626373626 points
HorseRose Rowhas108.5989010989011 points
HorseSpring Dreamhas115.46703296703296 points
C:\Java\Java Six>
Not bad huh?
Anyhow don't go losing your shirts on it.
'Bye for now.
Yours
Simon.
[edit]New lines to improve formattinv. CR[/edit]
[ August 17, 2008: Message edited by: Campbell Ritchie ]