public static void main(String args[]) { // read in each line from a file // create a Person of the appropriate type // add it to our ArrayList // sort the Array List

profileadelen
 (Not rated)
 (Not rated)
Chat

public static void main(String args[])

{

// read in each line from a file

// create a Person of the appropriate type

// add it to our ArrayList

// sort the Array List

// You should use the following rules to sort people using insertion sort

// Prof. should come before Grad. students, who should come before undergrads.

// Prof. should be sorted by department, then by ID.

// Grad students should be sorted by Major, then last name.

// Undergrad should be sorted by GPA, then Major

// once all lines are read, save the list into a file.

}

Text file:

Undergrad : Frederick Dilallo : 89136171: 4/7/1983: 2.63 : Communication Studies

Grad student : Amy Bunche : 85469658: 8/2/1979 : 3.46 : History

Professor : Allen Claeys : 91419913: 5/5/1955 : African Studies

    • 11 years ago
    the answer
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      the_answer.docx