Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Tester;
- import ServicePkg.Office;
- public class Tester {
- public static void main(String[] args) {
- try {
- // create office with maximum 10 waiting customers
- Office myOffice = new Office(10);
- // open the office for customers to arrive
- myOffice.open();
- // wait 500 to get customers, no employees yet
- Thread.sleep(500);
- // add two employees
- myOffice.addEmployee();
- myOffice.addEmployee();
- // wait 500 and then add new employee
- Thread.sleep(500);
- myOffice.addEmployee();
- // get employee out after 500
- Thread.sleep(500);
- myOffice.removeEmployee("Employee #1");
- // wait 500 before closing the office
- Thread.sleep(500);
- myOffice.close();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement