1 22 package test.dbc.office; 23 24 import java.util.ArrayList ; 25 26 33 public class OfficeManager 34 { 35 ArrayList computers = new ArrayList (); 36 ArrayList developers = new ArrayList (); 37 38 42 public Computer createComputer(String name) 43 { 44 Computer computer = new Computer(name); 45 computers.add(computer); 46 return computer; 47 } 48 49 53 public Developer createDeveloper(String name) 54 { 55 Developer developer = new Developer(name); 56 developers.add(developer); 57 return developer; 58 } 59 60 68 public void assignComputer(Computer computer, Developer developer) 69 { 70 System.out.println("========================= SET DEVELOPER =============================="); 71 computer.setDeveloper(developer); 72 System.out.println("========================= SET COMPUTER =============================="); 73 developer.setComputer(computer); 74 } 75 76 } 77 | Popular Tags |