Who understands number sorts?
How can i convert this this sort numericaly?
This reading from a file as well!
publicvoid SortCarsAlphabetically()
{
int tempPrice;
String tempCar;
for (int a = 0; a < count-1; a++)
{
min = a;
for (int b =a+1; b<count; b++)
{
if (car[b].compareTo(car[min])><0)
{
min = b;
}
}
tempCar = car[a];
car[a] = car[min];
car[min] = tempCar;
tempPrice = price[a];
price[a] = price[min];
price[min] = tempPrice;
{
}
System.out.println("*--*");
System.out.println("*The cars have now been alphabetically sorted*");
System.out.println(car[a]+"" +price[a]);
System.out.println("*--*");
}
}
cheers

