java-exercism-exercises/karls-languages/HINTS.md

1.6 KiB

Hints

1. Define a function to check if the language list is empty

2. Define a function to add a language to the list

  • Try using the add(E element) method.
  • Reminder: methods that return void do not need any return statements.

3. Define a function to remove a language from the list

  • Try using the remove(Object o) method.
  • Reminder: methods that return void do not need any return statements.

4. Define a function to return the first item in the list

5. Define a function to return how many languages are in the list

  • Try using the size() method.

6. Define a function to determine if a language is in the list

7. Define a function to determine if the list is exciting

  • Try using a for-each loop through all of the elements, checking each one.
  • Alternatively, try using the containsLanguage method from the previous step.