Added implementation for the getNames() method in StudentList