class for high scores to maintain sequence of high scoreswe develop class named scoreboard scoreboard is limited to certain number of high scores that can be savedonce that limit is reacheda new score only qualifies for the scoreboard if it is strictly higher than the lowest "high scoreon the board the length of the desired scoreboard may depend on the gameperhaps or since that limit may vary depending on the gamewe allow it to be specified as parameter to our scoreboard constructor internallywe will use python list named board in order to manage the gameentry instances that represent the high scores since we expect the scoreboard to eventually reach full capacitywe initialize the list to be large enough to hold the maximum number of scoresbut we initially set all entries to none by allocating the list with maximum capacity initiallyit never needs to be resized as entries are addedwe will maintain them from highest to lowest scorestarting at index of the list we illustrate typical state of the data structure in figure rob paul mike anna rose jack figure an illustration of an ordered list of length tenstoring references to six gameentry objects in the cells from index to with the rest being none complete python implementation of the scoreboard class is given in code fragment the constructor is rather simple the command self board [nonecapacity creates list with the desired lengthyet all entries equal to none we maintain an additional instance variablenthat represents the number of actual entries currently in our table for convenienceour class supports the getitem method to retrieve an entry at given index with syntax board[ (or none if no such entry exists)and we support simple str method that returns string representation of the entire scoreboardwith one entry per line