@@ -0,0 +1,1147 @@
+import java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0Aimport javax.swing.Timer;%0A%0Apublic class Operator implements ActionListener %7B%0A%09private boolean busy = false;%0A%09private int callTime = 0;%0A%09private int totalCall = 0;%0A%09private int totalTime = 0;%0A%09private int randomCallTime = -1;%0A%09private Timer time = new Timer(1000, this);%0A%0A%09public Operator() %7B%0A%09%09time.start();%0A%09%7D%0A%0A%09public void call() %7B%0A%09%09busy = true;%0A%09%09totalCall++;%0A%09%7D%0A%0A%09public void end() %7B%0A%09%09busy = false;%0A%09%09totalTime += callTime;%0A%09%09callTime = 0;%0A%09%7D%0A%0A%09@Override%0A%09public void actionPerformed(ActionEvent e) %7B%0A%09%09if (busy)%7B%0A%09%09%09callTime++;%0A%09%09%09if (randomCallTime == callTime)%0A%09%09%09%09end();%0A%09%09%7D%0A%09%09else if ((int) (Math.random() * 15) == 5) %7B%0A%09%09%09call();%0A%09%09%09randomCallTime = (int) (30 + Math.random() * 121);%0A%09%09%7D%0A%0A%09%7D%0A%0A%09public boolean isBusy() %7B%0A%09%09return busy;%0A%09%7D%0A%0A%09public void setBusy(boolean busy) %7B%0A%09%09this.busy = busy;%0A%09%7D%0A%0A%09public int getTotalCall() %7B%0A%09%09return totalCall;%0A%09%7D%0A%0A%09public void setTotalCall(int totalCall) %7B%0A%09%09this.totalCall = totalCall;%0A%09%7D%0A%0A%09public int getTotalTime() %7B%0A%09%09return totalTime;%0A%09%7D%0A%0A%09public void setTotalTime(int totalTime) %7B%0A%09%09this.totalTime = totalTime;%0A%09%7D%0A%7D%0A

Create Operator.java