Write a class named player that stores a players name

Assignment Help JAVA Programming
Reference no: EM131588591

Programming Assignment

This assignment will give you practice with classes, methods, and arrays.

Part 1: Player Class
Write a class named Player that stores a player's name and the player's high score. A player is described by:
- player's name
- player's high score
In your class, include:
- instance data variables
- two constructors
- getters and setters
- include appropriate value checks when applicable
- a toString method

Part 2: PlayersList Class
Write a class that manages a list of up to 10 players and their high scores. Create a single array of type Player that stores the players' names and scores.
In your class, include:
- a single array of type Player to hold player name and score.
- a constructor
Your class should support the following features:
- Add a new player and score (up to 10 players). method header: public void addPlayer()
- Print all the players' names and their scores to the screen. method header: public void printPlayers()
- Allow the user to enter a player's name and output that player's score or a message if that
player's name has not been entered.
method header: public void lookupPlayer()
Notes
- You can include additional instance data variables if it is helpful. If you include additional variables, include additional getters and setters as appropriate.
- I have provided a driver program ScoreManagementSystem.java you can use to test your code and sample output.Score Management System Choose:
A)dd new player P)rint all players
L)ookup a player's score Q)uit

A
Enter name: Alexander Enter score: 300

Score Management System Choose:
A)dd new player P)rint all players
L)ookup a player's score Q)uit

A
Enter name: Michael Enter score: 200

Score Management System Choose:
A)dd new player P)rint all players
L)ookup a player's score Q)uit

P
Score Name
300 Alexander
200 Michael
Score Management System Choose:
A)dd new player P)rint all players
L)ookup a player's score Q)uit

L
Enter name to look up.
George
Name not found.

Score Management System Choose:
A)dd new player
P)rint all players
L)ookup a player's score
Q)uit

P
Score Name
300 Alexander
200 Michael
Score Management System Choose:
A)dd new player P)rint all players
L)ookup a player's score Q)uit

L
Enter name to look up. Michael

Michael's score = 200

Score Management System Choose:
A)dd new player P)rint all players
L) ookup a player's score Q)uit
Q
Submission Instructions
- Execute the program and copy/paste the output that is produced by your program into the bottom of the source code file, making it into a comment. I will run the programs myself to see the output.
- Make sure the run "matches" your source. If the run you submit could not have come from the source you submit, it will be graded as if you did not hand in a run.
- Use the Assignment Submission link to submit the source code file.
- Submit the following files:
o Player.java
o PlayersList.java
o ScoreManagementSystem.java

Attachment:- ScoreManagementSystem.rar

Reference no: EM131588591

Questions Cloud

Determine stresses in the rod and the sleeve : A copper rod 1.4 in in diameter is placed in an aluminum sleeve with inside diameter 1.42 in and wall thickness 0.2 in, as shown in Figure.
Evaluate the planning function of management : Imagine you are an executive for a Fortune 500 company, Evaluate the planning function of management as it relates to the organization's goals and strategies
Compare job costing with process costing : Compare job costing with process costing. Looking at Q10-4above, if expected sales are 50,000 units what is the margin of safety?
Describe how the hpa axis regulates our response to stress : Briefly describe how the HPA axis regulates our response to stress. Include the hormones and neurotransmitters that are released
Write a class named player that stores a players name : Write a class named Player that stores a players name and the players high score - Write a class that manages a list of up to 10 players and their high scores
What is the credit amount for long term liabilities : What is the Credit amount for Long Term Liabilities? What is the Debit amount for Property, Plant & Equipment
Describe how each theory explains why mismatched levels : describe how each theory explains why mismatched levels of power within society need to be maintained. Do you agree. Why
What is the primary basis of accounting for inventories : What is the primary basis of accounting for inventories? What is major advantage and major disadvantage of specific identification method of inventory costing?
Best practices for comprehensive tobacco control programs : Discuss each of the six skills of a good leader from the Best Practices for Comprehensive Tobacco Control Programs

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd