Question: Write a main method that tests your methods from parts a - c with the following array of cars: Car cars [ ] = {

Write a main method that tests your methods from parts a-c with the following
array of cars:
Car cars[]={
{ "Toyota", "Camry", 33},
{ "Ford", "Focus", 40},
{ "Honda", "Accord", 34},
{ "Ford", "Mustang", 31},
{ "Honda", "Civic", 39},
{ "Toyota", "Prius", 48},
{ "Honda", "Fit", 35},
{ "Toyota", "Corolla", 35},
{ "Ford", "Taurus", 28}
}
CSE-41321
2
Your test program should do the following:
1. Output (displaying make, model, and MPG) the cars in original unsorted order.
2. Output the cars sorted (using qksort from the book) by make then model.
3. Output the cars sorted (using qksort from the book) by descending MPG.
4. Output the cars sorted (using qksort from the book) by make then descending MPG

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!