/**
 *  Copyright Murex S.A.S., 2003-2016. All Rights Reserved.
 *
 *  This software program is proprietary and confidential to Murex S.A.S and its affiliates ("Murex") and, without limiting the generality of the foregoing reservation of rights, shall not be accessed, used, reproduced or distributed without the
 *  express prior written consent of Murex and subject to the applicable Murex licensing terms. Any modification or removal of this copyright notice is expressly prohibited.
 */
public class Schedule {

    //~ ----------------------------------------------------------------------------------------------------------------
    //~ Methods
    //~ ----------------------------------------------------------------------------------------------------------------

    public static void main(String[] args) {

    }
}

@@ -488,337 +488,1966 @@
  */%0A
-public class Schedule %7B%0A%0A    //~ ----------------------------------------------------------------------------------------------------------------%0A    //~ Methods%0A    //~ ----------------------------------------------------------------------------------------------------------------%0A%0A    public static void main(String%5B%5D args) %7B%0A
+import java.io.File;%0Aimport java.io.FileNotFoundException;%0A%0Aimport java.util.Collections;%0Aimport java.util.Comparator;%0Aimport java.util.List;%0A%0A%0A/**%0A * Copyright Murex S.A.S., 2003-2016. All Rights Reserved. This software program is proprietary and confidential to%0A * Murex S.A.S and its affiliates (%22Murex%22) and, without limiting the generality of the foregoing reservation of rights,%0A * shall not be accessed, used, reproduced or distributed without the express prior written consent of Murex and subject%0A * to the applicable Murex licensing terms. Any modification or removal of this copyright notice is expressly%0A * prohibited.%0A */%0Apublic class Schedule %7B%0A%0A    //~ ----------------------------------------------------------------------------------------------------------------%0A    //~ Methods%0A    //~ ----------------------------------------------------------------------------------------------------------------%0A%0A    public static void main(String%5B%5D args) %7B%0A        try %7B%0A            String filePath = args%5B0%5D;%0A            List%3CJob%3E jobList = JobFileReader.read(new File(filePath));%0A            Collections.sort(jobList, new Comparator%3CJob%3E() %7B%0A                    public int compare(Job o1, Job o2) %7B%0A                        int score1 = o1.getWeight() - o1.getLength();%0A                        int score2 = o2.getWeight() - o2.getLength();%0A                        int diffScore = score2 - score1;%0A                        return (diffScore != 0) ? diffScore : (o2.getWeight() - o1.getWeight());%0A                    %7D%0A                %7D);%0A%0A            int weightSum = 0;%0A            int currentTime = 0;%0A            for (int i = 0; i %3C jobList.size(); i++) %7B%0A                Job job = jobList.get(i);%0A                currentTime += job.getLength();%0A                weightSum += job.getWeight() * currentTime;%0A            %7D%0A            System.out.println(weightSum);%0A%0A        %7D catch (FileNotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D
 %0A   

add calcul of completion times