Hi,
I have an array, and it must be sorted. The array's objects have associating values.
For example, an array of city details contains these information per object: (String) cityName, (double) cityNumber, (int) cityNumberOfPets.
//e.g.
city[0] = ("Chicago", 243.2, 14);
city[1] = ("New York", 25.3, 15432);
city[2] = ("Dallas", 2.0, 1512);
city[3] = ("Florida", 63.4, 23);
If I were to sort this array by the cityNumber, how would I sort it so that its cityName and cityNumberOfPets are still associated with it?
Any tips would be great.