Hey Guys i was wondering if i could get a bit of help
I'm creating a program that contains a number of different sorting methods (insertion, quick, merge) that sort an array of bikes.
Bike[] bikes = new Bike[13];
bikes[0] = new Bike("Mountain", 160, "Diamond", 6, 18, "Standard", "Hardtail", "V Brakes");
bikes[1] = new Bike("Mountain", 199.99, "Step-through", 7, 20, "Single Shock", "Horst Link", "Cantilever");
bikes[2] = new Bike("Tandem", 150, "Tandem", 5, 22, "Standard", "Single", "Spoon");
I'm then do a simple switch statement that calls the insertion sort method
switch (option) {
case 1:
insertionSort();
Then creating a generic insertion sort method
private static <T extends Comparable<? super T>> void insertionSort(T [] bikes) {
}
The problem that I am having is that I cannot figure out what exactly is meant to go within the brackets within the insertionSort() case statement and within the void insertionSort() brackets in the insertion sort method.
Everything that i have tried will not work with the code that I have to use with the insertionSort method.
I'm not asking for anyone to actually do it for me, just a couple of pointers as to were I am going wrong.
Many Thanks
:)