Name: __________________________ NetID: _____________ Name: __________________________ NetID: _____________ Name: __________________________ NetID: _____________
Consider the Student class.
Write the method uniqueNames whose header is given below. This method takes as input an ArrayList of type Student and a year indicator and returns a TreeSet of the unique names of all students whose year matches the year indicator.
For example, if an ArrayList of Student types called Dook contained the following five persons (indicating their name and year):
Ed first-year, Ma sophomore, Jo first-year, Qiang first-year, Jo first-yearthen the call uniqueNames(Dook, "first-year") would return a TreeSet containing the strings: "Ed", "Jo" and "Qiang".