I have a project that requires we create a an object array and then we place that in a linked list, I am kind of stuck because I have trouble writing/implementing my sort method that is supposed to sort the the linked list. Here is my code of how far I've gone. By the way, the object name is 'temperature'; Thank you.
public class SelectionSort
{
private static void SelectionSort (Temperature[] array, int size)
{
for ( int i = 0; i < size - 1; i++ )
{
int indexLowest = i;
for ( int j = i + 1; j < size; j++ )
{
if ( array[j] < array[indexLowest] )
indexLowest = j;
if ( array[indexLowest] != array[i] )
{
Temperature temp = array[indexLowest];
array[indexLowest] = array[i];
array[i] = temp;
}// if
}//for j
}// for i
}// method
}
std::sort.