Package model

Class Highscore

java.lang.Object
model.Highscore

public class Highscore
extends java.lang.Object
Highscore is a class that holds a score and a corresponding name (of a player).
  • Constructor Summary

    Constructors 
    Constructor Description
    Highscore​(int score, java.lang.String name)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    java.lang.String getName()  
    int getScore()  
    int hashCode()  
    void setScore()
    setScore() - Updates the highscore database with a new highscore.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Highscore

      public Highscore​(int score, java.lang.String name)
  • Method Details

    • getScore

      public int getScore()
    • getName

      public java.lang.String getName()
    • setScore

      public void setScore()
      setScore() - Updates the highscore database with a new highscore.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object