@@ -0,0 +1,2275 @@
+public class Draw %7B%0A    %0A    // For each time point we plot the components taken by the workers and the belt.%0A    // E.g. two components (A,B); belt of length L=3%0A    //%0A    // piece 1       A A A   %3C--- first  'hand' of workers 1,2,3 (on the left of the belt)%0A    // piece 2       - - -   %3C--- second 'hand' of workers 1,2,3 (on the left of the belt)%0A    //  BELT         A = P   %3C--- positions 1,2,3 of the belt%0A    // piece 1       B A A   %3C--- first  'hand' of workers 1,2,3 (on the right of the belt)%0A    // piece 2       - - -   %3C--- second 'hand' of workers 1,2,3 (on the right of the belt)%0A    //%0A    // For each time there are two plots:%0A    // 1) as soon as the belt has slided%0A    // 2) after workers have performed their actions%0A        %0A    private Belt   mybelt;%0A    private Worker myworker;%0A    %0A    private int L;%0A    private int nC;%0A    %0A    public Draw(int L, int nC)%7B%0A        %0A        this.L  = L;%0A        this.nC = nC;%0A        %0A    %7D%0A    %0A    public void test(Belt B, Worker W)%7B%0A        %0A        mybelt   = B;%0A        myworker = W;%0A        %0A        // ---------------------------------------------------------------------%0A     %0A        for(int i=0; i%3CnC; i++)%7B%0A            System.out.print(%22piece %22 + (i+1) + %22       %22);%0A            for(int j=0; j%3CL; j++)%7B%0A                if(W.wL%5Bj%5D%5Bi%5D==null)%7B%0A                    System.out.print(%22-%22 + %22 %22);%0A                %7D else%7B%0A                    System.out.print(W.wL%5Bj%5D%5Bi%5D + %22 %22);%0A                %7D                    %0A            %7D%0A            System.out.println();%0A        %7D%0A        %0A        System.out.print(%22 BELT         %22);%0A        for(int i=0; i%3CL; i++)%7B%0A            if(B.belt%5Bi%5D==null)%7B%0A                System.out.print(%22=%22 + %22 %22);%0A            %7D else %7B%0A                System.out.print(B.belt%5Bi%5D + %22 %22);%0A            %7D            %0A        %7D%0A        System.out.println();%0A        %0A        for(int i=0; i%3CnC; i++)%7B%0A            System.out.print(%22piece %22 + (i+1) + %22       %22);%0A            for(int j=0; j%3CL; j++)%7B%0A                if(W.wR%5Bj%5D%5Bi%5D==null)%7B%0A                    System.out.print(%22-%22 + %22 %22);%0A                %7D else%7B%0A                    System.out.print(W.wR%5Bj%5D%5Bi%5D + %22 %22);%0A                %7D %0A            %7D%0A            System.out.println();%0A        %7D%0A        System.out.println();%0A        %0A    %7D%0A    %0A%7D%0A

Create Draw.java