Add code to announce the winner.
We'll make two methods in the Hippodrome class:
public Horse getWinner() and public void printWinner()
The getWinner method must return the horse that has run the farthest.
The printWinner method displays the winner's name as follows:
The winner is <name>!
Hippodrome (part 15)
- 6
Locked
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
thinhnguyen
29 September 2019, 09:27
Please check the test case for printWinner method.
My solution didn't verify when printing with the format:
"The winner is <name>!".
0
Roman
1 October 2019, 06:50
Thanks, we'll fix it. If you want to pass the test now you should printing with the format:
"Winner is !".
0