1.6 KiB
1.6 KiB
Hints
1. Define a function to check if the language list is empty
- Try using the
isEmpty()
method.
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 anyreturn
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 anyreturn
statements.
4. Define a function to return the first item in the list
- Try using the
get(int index)
method.
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
- Try using the
contains(Object o)
method.
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.