@@ -0,0 +1,763 @@
+package scheduling.three;%0A%0Aimport java.util.BitSet;%0A%0A/**%0A * Created by vivace on 08.04.17.%0A * %3Cp%3E%0A * Array of booleans represented as bits%0A * with built in counting of all ones.%0A */%0Apublic class BooleanArray extends BitSet %7B%0A%0A    private int count = 0;%0A%0A    BooleanArray(int size) %7B%0A        super(size);%0A    %7D%0A%0A    @Override%0A    public void set(int bitIndex) %7B%0A        if (!get(bitIndex)) %7B%0A            count++;%0A        %7D%0A%0A        super.set(bitIndex);%0A    %7D%0A%0A    @Override%0A    public void set(int bitIndex, boolean value) %7B%0A        if (get(bitIndex) && !value) %7B%0A            count--;%0A        %7D else if (!get(bitIndex) && value) %7B%0A            count++;%0A        %7D%0A%0A        super.set(bitIndex, value);%0A    %7D%0A%0A    public int getCount() %7B%0A        return count;%0A    %7D%0A%7D%0A

Add BooleanArray class