Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Qatar University Dept. of Computer Science & Engineering Data Structure (CMPS303) Spring 2018 HW1 Arrays Given the class GameEntry and ScoreBoard ( that we covered

image text in transcribed
Qatar University Dept. of Computer Science & Engineering Data Structure (CMPS303) Spring 2018 HW1 Arrays Given the class GameEntry and ScoreBoard ( that we covered in the lecture). The ScoreBoard saves the entries in an ascending order, so we have to shift the clements when we add or remove an clement Assume we do not want to save the entries sorted in order to avoid shift operations, however the array in the board should not have null values between the elements. a) Rewrite the methods addfe ), removefi) without using any loops( so they have better b) Add method kighestScore it returns the name of the entry with the heights score. If there are c) Add method removeMax) which removes the entry that has the maximum score. If there are d) Add method noluplicate which removes all duplicated scores. For example if there are tree e) To class GameEntry, add method toString that returns name and score of the entry, and to class f) Create a test class call it BoardTest with main. many, it returns the first occurrence of them. many, it removes the first occurrence of them entries with score 50, two of them will be removed ScoreBoard, add method print) that prints all entries currently in the board. .Add five entries to the board, and print them Test each one of the methods above. (print the entries of the board when ncoded to show that the method works) The java code of: class GameEntry, class ScoreBoard, and class BoardTest .Print screen of the exccution of your code. Qatar University Dept. of Computer Science & Engineering Data Structure (CMPS303) Spring 2018 HW1 Arrays Given the class GameEntry and ScoreBoard ( that we covered in the lecture). The ScoreBoard saves the entries in an ascending order, so we have to shift the clements when we add or remove an clement Assume we do not want to save the entries sorted in order to avoid shift operations, however the array in the board should not have null values between the elements. a) Rewrite the methods addfe ), removefi) without using any loops( so they have better b) Add method kighestScore it returns the name of the entry with the heights score. If there are c) Add method removeMax) which removes the entry that has the maximum score. If there are d) Add method noluplicate which removes all duplicated scores. For example if there are tree e) To class GameEntry, add method toString that returns name and score of the entry, and to class f) Create a test class call it BoardTest with main. many, it returns the first occurrence of them. many, it removes the first occurrence of them entries with score 50, two of them will be removed ScoreBoard, add method print) that prints all entries currently in the board. .Add five entries to the board, and print them Test each one of the methods above. (print the entries of the board when ncoded to show that the method works) The java code of: class GameEntry, class ScoreBoard, and class BoardTest .Print screen of the exccution of your code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago