In Java, the report.txt must list the students sorted by either the gpa or number of credit
Fantastic news! We've Found the answer you've been seeking!
Question:
In Java, the report.txt must list the students sorted by either the gpa or number of credit hours. Use the Java Comparator interface to sort the students. For that, copy the Student objects into an ArrayList that you sort by gpa or by credit hours - use the code provided:
for (int i = 0; i < count; i++){
if (persons[i] instanceof Student)
persons[i].report(myWriter);
}
myWriter.close();
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: