import java io */for / ///////////////////////////////////////////////////////////////class darray private double[thearray/ref to array thearray private int nelems/number of data items //public darray(int maxthearray new double[max]nelems /constructor /create array //public void insert(double valuethearray[nelemsvaluenelems++/put element into array /insert it /increment size //public void display(/displays array contents for(int = <nelemsj++/for each elementsystem out print(thearray[ ")/display it system out println("")//public void mergesort(/called by main(/provides workspace double[workspace new double[nelems]recmergesort(workspace nelems- )/private void recmergesort(double[workspaceint lowerboundint upperboundif(lowerbound =upperbound/if range is return/no use sorting else /find midpoint int mid (lowerbound+upperbound /sort low half recmergesort(workspacelowerboundmid)