public class GameEntry
extends Object
A representation of an entry on a scoreboard.
-
Constructor Summary
Constructors
Constructs a game entry with given parameters.
-
Method Summary
int
Returns a string representation of this entry.
-
Constructor Details
-
GameEntry
public GameEntry(String n,
int s)
Constructs a game entry with given parameters.
- Parameters:
n
- the user's name
s
- the user's score
-
Method Details
-
getName
Returns the name field.
- Returns:
- the name of the user
-
getScore
public int getScore()
Returns the score field.
- Returns:
- the user's score
-
toString
Returns a string representation of this entry.
- Overrides:
toString
in class Object
- Returns:
- a string representation of the entry