private double[thearrayprivate int nelems/ref to array thearray /number of data items //public arrayins(int max/constructor thearray new double[max]/create the array nelems /no items yet //public void insert(double value/put element into array thearray[nelemsvalue/insert it nelems++/increment size //public void display(/displays array contents system out print(" =")for(int = <nelemsj++/for each elementsystem out print(thearray[ ")/display it system out println("")//public void quicksort(recquicksort( nelems- )insertionsort( nelems- )//public void recquicksort(int leftint rightint size right-left+ if(size /insertion sort if small insertionsort(leftright)else /quicksort if large double median medianof (leftright)int partition partitionit(leftrightmedian)recquicksort(leftpartition- )recquicksort(partition+ right)/end recquicksort(