Computer Game and Prints the Leaderboard - Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task

 

Task 1 - For this task, you are to write code that manages the scores for a computer game and prints the leaderboard. 
 

Instructions 

The scoreboard program found below is currently missing two important pieces of functionality - it doesn't record scores, nor is it able to print the leaderboard. 
 

Provided for you is the ScoreEntry class which contains the player name and score of each entry on the scoreboard, and the Scoreboard class which is responsible for maintaining the list of score entries.

Your task is to implement this missing functionality by adding two methods to the Scoreboard class as described below. 

This method is to take a player's name and their score as arguments, create a new score Entry object, and then append it to the appropriate list of scores. 

This method is to take no arguments and print the name and score of the top three players in descending order of score.

Hint: If you find your solution printing the bottom three scores, you may need to look at the documentation, and in particular the 'reverse" named argument. 
 

Requirements To achieve full marks for this task, you must follow the instructions above when writing your solution. Additionally, your solution must adhere to the following requirements:

• You must use the sort method (hint: the provided function get_score will come in handy).

• You must use list slicing as part of your solution. You must not use list indexing to retrieve individual list Items.

• YOU must not use break, continue Or return statements in print eaderboard. 

 

 

This Computer Science Assignment has been solved by our Computer Science experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.