Question: below: public class Student { public String name; public int ID; public int grade; public Student(String nm, int id, int g) { name= nm; ID=
COMP 3040 Data Structures Lab 9/5/2018 Instruction: Download sorting Time.java program. Modify the code according to the hints in the program so that you can test all 3 sorting algorithms and the Binary Search algorithm, respectively a) Run the 3 sorting algorithms for array size 1000, 5000, and 10000, respectively. Record the running times on an Excel spreadsheet. Draw curve chart to compare the times Bubble 1000 5000 b) Modify insertionSort (slide 38) so that it can sort array of Student objects by grade. Test your code in the main method. The definition of the class Student is provided as below public class Student public String name public int ID public int grade; public Student (String nm, int id, int g) name = nm; IDid grade g; public String tostring() String. format( "[Name: name, %1$s, ID: %25d- return %35d]", Grade: ID, grade); The following is an example of running page of 10 students
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
