Write a class that maintains the top 10 scores for a game application, implementing add and remove methods , but using a singly linked list instead of an array. Run and output the result from the following set of previous scores: 101, 34, 52, 100, 34, 1, 23, 203, 34, 57, 29, 3, 15..
public class GameScores {
protected Node head;
protected long size = 10;
/** Default constructor that creates an empty list */
public GameScores() {
head = null;
size = 0;
}
}
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









