Create a JAVA class called SortFile. It has a single attribute  – – an ArrayLis

Important - Read this before proceeding

These instructions reflect a task our writers previously completed for another student. Should you require assistance with the same assignment, please submit your homework details to our writers’ platform. This will ensure you receive an original paper, you can submit as your own. For further guidance, visit our ‘How It Works’ page.

Create a JAVA class called SortFile. It has a single attribute 


an ArrayList of integers.The class constructor will receive a file anme as its parameter. This file will contain abunch of numbers. The constructor will read the numbers and add them to the ArrayList.The class will also have a method called sort. This method will receive no input and doesnot return anything. It will sort the ArrayList in ASCENDING order. It will use theQuicksort algorithm to do so
.
DO NOT USE THE PREDEFINED COLLECTIONSSORT METHOD! Theresultant ArrayList should not have duplicate values. You can either ignore duplicatevalues as your sort the list, or remove them after you have sorted it
.
I do not care whichway you do it
,
so long as the finished sorted ArrayList does not contain duplicate values.The final method of this class is printList. It also does not receive any input nor returnanything. It will print the contents of the ArrayList, in order, where each value isseparated by a comma. The final number does not have a comma at the end, but a periodinstead.

Leave a Comment