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=

 below: public class Student { public String name; public int ID;
public int grade; public Student(String nm, int id, int g) { name=
below:
public class Student
{
public String name;
public int ID;
public int grade;
public Student(String nm, int id, int g)
{
name= nm;
ID= id;
grade= g;}
publicString toString() {
return String.format
(
"[Name: %1$s, ID: %2$d, Grade: %3$d]", name, ID, grade);
}
}

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!