Note: The compareTo method will evaluate the different fields based on the comparison type.
e.g. Cylinder 9431.453 4450.123 or Cone 674.2435 652.1534
e.g. SquarePrism 8945.234 3745.334
e.g. Pyramid 6247.53 2923.456
The testing application will then invoke the utility methods to re-arrange the figures according to the compare type from the largest to smallest. Assume the sorted algorithm is implemented. The compare type will be provided as input to your program. -h for height, -v for volume, and -a for base area. The program should print the time it took to sort the array for each sorting algorithm. It should also print the first and last value and every thousandth value in between. Implement the sorting algorithms as part of a utility class. It must sort an array or vector of Comparables. Make sure it is not dependent on the testing application and that it can be re-used in the future.
File name F, the compare type and the sort type are provided as parameters (-f –t –s or -F –T –S ) via command line. The program must be order and case insensitive. For example, all examples below are valid inputs:
java -jar sort.jar –fpolygons1.dat –Tv –Sb
java -jar sort.jar –ta –sQ –fpolygons4.dat
java -jar sort.jar –tH –Fpolygons2.dat –sB
where v is volume, h is height, a is base area, b is bubble, s is selection, i is insertion, m is merge, q is quick, and your implemented sort is z.
Assignment Writing Help
Engineering Assignment Services
Do My Assignment Help
Write My Essay Services