(String title, Person hire)
| 21 | return false; |
| 22 | } |
| 23 | public void fillPosition(String title, Person hire) { |
| 24 | for(Position position : this) |
| 25 | if(position.getTitle().equals(title) && |
| 26 | position.getPerson().empty) { |
| 27 | position.setPerson(hire); |
| 28 | return; |
| 29 | } |
| 30 | throw new RuntimeException( |
| 31 | "Position " + title + " not available"); |
| 32 | } |
| 33 | public static void main(String[] args) { |
| 34 | Staff staff = new Staff("President", "CTO", |
| 35 | "Marketing Manager", "Product Manager", |