Write a complete program with a class Student that overrides equals (two students are equal when their names match) and toString (returns the name).
Read a count and that many names. Keep only the first occurrence of each, then print the list and how many duplicates were rejected.
For 5 then Ada Sam Ada Bo Sam:
[Ada, Sam, Bo]
2
Use list.contains(...) — it works only because you overrode equals.