Question
Sort an array of objects - using any of the sort methods like bubble sort or the Selection sort. It's your choice. Use the following
Sort an array of objects - using any of the sort methods like bubble sort or the Selection sort. It's your choice. Use the following criteria for your assignment: The object class should be a Student with the following attributes: id: integer name: String write the accessors, mutators, constructor, and toString().
In your main test class you will write your main method and do the following things: Create an array of Student objects with at least 5 students in your array. The sort method must be written yourself and included in the main class. The sort method will sort based on student id.
Output the array out in unsorted order as it exists. Sort the array Output the sorted array Your code should represent your own work and should not be copied from a site. You will be required to complete a sort of an array (or two) in your final lab - making this lab very important to get correct. Make sure you write all the methods listed above for full credit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started