Package flashcards

Class Flashcard


  • public class Flashcard
    extends Object
    Immutable type representing a flashcard, e.g., for learning vocabulary words in a native language or foreign language.

    PS1 instructions: do NOT change this class.

    • Constructor Detail

      • Flashcard

        public Flashcard​(String front,
                         String back)
        Make a flashcard.
        Parameters:
        front - the card's front side, e.g. a vocabulary word
        back - the card's back side, e.g. its definition
    • Method Detail

      • getFront

        public String getFront()
        Returns:
        the card's front side
      • getBack

        public String getBack()
        Returns:
        the card's back side
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object