def getData(filePath):
    '''
    Given a filepath getData opens that file, then parses through the lines
    one by one splitting the values into an array, then assigning them
    to a new process object. These process objects are added to an array
    and returned at the end.
    '''

    f = open(filePath, 'r')
    processArray = []
    for line in f:
        processItemArray = line.split()

        # There is a strong dependency here that the data be well formed as:
        #  Process ID  |  Arrival Time  | Duration
        current_process = Process()
        current_process.setID(processItemArray[0])
        current_process.setArrivalTime(int(processItemArray[1]))
        current_process.setDuration(int(processItemArray[2]))

        processArray.append(current_process)
    f.close()

    return processArray