OfficeManagerpublic class OfficeManager extends Object
Fields Summary |
---|
ArrayList | computers | ArrayList | developers |
Methods Summary |
---|
public void | assignComputer(Computer computer, Developer developer)PreCond: The computer and developer must both be not-null, and not previously assigned
PostCond: Make sure that all developers have a computer, and that that computer is
associated with the developer in question
System.out.println("========================= SET DEVELOPER ==============================");
computer.setDeveloper(developer);
System.out.println("========================= SET COMPUTER ==============================");
developer.setComputer(computer);
| public Computer | createComputer(java.lang.String name)PostCond: The computer should be unassigned after adding
Computer computer = new Computer(name);
computers.add(computer);
return computer;
| public Developer | createDeveloper(java.lang.String name)PostCond: The developer should not have a computer after adding
Developer developer = new Developer(name);
developers.add(developer);
return developer;
|
|