David:35.123 Fred:128.1 Alexander:231 Fred:45.34Note that the same name may appear more than once. The program should read all such tokens and then output, with appropriate headings, a list of the players and, for each, the total points (to 2 decimal places) he/she has achieved. The list should be sorted in non-decreasing order by player name. There is a restriction on player names: a legal name must be at least 4 characters long and may not contain a ':'.
% java Q2 Enter the scores: William:20.12 Dave:10.25 William:10.111 blah Dave:hello Dave:1.100 NAME POINTS ==== ====== Dave 11.35 William 30.23 % % java Q2 Enter the scores: Dave:25.10001 Michael:10.341 blah blah blah Michael:three Fred:100.5 Dave:20.2 Kay:100.25 blah blah Dave:10.3 Fred:10.0 Dave100 NAME POINTS ==== ====== Dave 55.60 Fred 110.50 Michael 10.34 %
Here (again) are the common APIs that you may access:
Here is the command to submit your work
(further details regarding the submit command can also be
obtained by
typing man submit
Once again, you are encouraged to submit
regularly.
Newer submissions overwrite older ones.
submit 1020 exam Q2.java