@@ -0,0 +1,764 @@
+package ru.agolovin;%0A%0A/**%0A * @author agolovin (agolovin@list.ru)%0A * @version $Id$%0A * @since 0.1%0A */%0A%0Apublic class Lock %7B%0A%0A    /**%0A     * Lock monitor.%0A     */%0A    private boolean flag = false;%0A%0A    /**%0A     * Lock object.%0A     *%0A     * @return boolean result.%0A     * @throws InterruptedException e%0A     */%0A    private boolean lock() throws InterruptedException %7B%0A        synchronized (this) %7B%0A            while (flag) %7B%0A                this.wait();%0A            %7D%0A            this.flag = true;%0A            return true;%0A        %7D%0A    %7D%0A%0A    /**%0A     * Unlock object.%0A     *%0A     * @return boolean result.%0A     */%0A    private boolean unLock() %7B%0A        synchronized (this) %7B%0A            this.flag = false;%0A            notify();%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

add task3 in part4 chapter7 package2