Class GameEntry

java.lang.Object
com.zybooks.dsaj.fundamental.GameEntry

public class GameEntry extends Object
A representation of an entry on a scoreboard.
  • 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

      public String 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

      public String toString()
      Returns a string representation of this entry.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the entry