do it in small steps:
Put the items to be sorted into a list.
Print out the contents of the list to see the BEFORE order.
Adding a toString() method to the class will make it easier to print out...
Type: Posts; User: Norm
do it in small steps:
Put the items to be sorted into a list.
Print out the contents of the list to see the BEFORE order.
Adding a toString() method to the class will make it easier to print out...
If the items to be sorted are in an array and the method takes an array as a parameter, have you tried calling the method with the array as an argument?
However you want to do it.
Putting it in its own class would let you use it in other apps.
Have you looked up/Googled the logic for a Binary search?
For testing, create a small program with a small array of DVD objects, print out the array, call the sort method and then print out the array after the sort.
That should allow you to test the...
Does it do the sorting you want? If so, use it.
Please Edit your post and wrap your code with
<YOUR CODE HERE> to get highlighting