public ArrayList<Process> generateProcesses()
    {
        float arrivalTime;
        float expectedTime;
        int priority;
        generator = new Random(1); //paramater is seed used for random number generator

        for(int i = 0; i < numProcesses; i++){
            //create random number for arrival time
            arrivalTime = (float)(generator.nextDouble() * 99.0);
            //create random number for expected run time
            expectedTime = (float)(generator.nextDouble() * 9.9 + 0.1);
            //create random number for priority
            priority = generator.nextInt(4) + 1;
            //create new Process object and pass in these three
            newProcess = new Process(arrivalTime, expectedTime, priority);
            //put the Process object in array processArray using i as index
            processArrayList.add(newProcess);
            System.out.println(processArrayList.get(i).getArrivalTime()
                + "  " + processArrayList.get(i).getExpectedTime()
                + "  " + processArrayList.get(i).getPriority());
        }
        System.out.println("\n  ");

        Collections.sort(processArrayList, new Comparator<Process>()
            {
                public int compare(Process process1, Process process2)
                {
                    if (process1.getArrivalTime() < process2.getArrivalTime()) return -1;
                    if (process1.getArrivalTime() > process2.getArrivalTime()) return +1;
                    return 0;
                }
            });

        for(int i = 0; i < numProcesses; i++){
            System.out.println("arrival time:  " + processArrayList.get(i).getArrivalTime()
                + "  " + processArrayList.get(i).getExpectedTime()
                + "  " + processArrayList.get(i).getPriority());
        }

        return processArrayList;
    }