Posted on 2006-07-21
i asked this previous n u asked me to try myself n come back f stuck,well here i am
Write a Java program that creates a number of Player objects (with ‘name’, ‘points’, and ‘rank’ properties) and assigns them random points.
Sort the players and populate the ‘rank’ property based on the player’s points.”
The sorting of the rankings should be dynamic.
Provide unit tests that exercise your solution.
Provide a short explanation of your code.
For extra credit:
Provide a timer that assigns further points to each player and as a consequence the player’s rankings change.
This timer should be off by default.
Player[name] = new Player();
int xpoints = Player[name].getpoints();
can set up object of arrays but get error also dont know how to set rankings
your help would b appreciated cheers