Suppose you have been assigned to revamp the oﬃcial website of Arsenal FC. Your ﬁrst responsibility is to maintain some basic information on team staﬀs. There are primarily three diﬀerent types of staﬀs – coach, manager, and medical oﬃcer. There are again two types of medical oﬃcers – doctors and physiotherapist. You may assume these are the only types of staﬀs available. More than one person can be assigned to a post. The full structure can be expressed as follows: • Staﬀ – Coach ∗ Unai Emery ∗ Neil Banﬁeld – Manager ∗ Steve Bould ∗ Vic Akers OBE – Medical Oﬃcer ∗ Doctors · Gary O’Driscoll ∗ Physiotherapist · Andrew Rolls Each of the personnel has some attributes as shown in table 1. At startup of your code you should have this structure and data already setup. Apart from the salary received from the club, the staﬀ earns from other sources (external revenue) such as advertisements, promotions, etc. A certain percentage (commission percentage) of this income has to be donated to the club by each staﬀ.
2 To Do
Simulate a system which allows you to view detailed reports of age, salary, and club commission. See the attached ﬁgure at the end of the document for clariﬁcation. You should also be able to add or remove terminal staﬀs from your team structure.
Table 1: Description of various personnel. Name Age Salary External Revenue Commission Percentage type Unai Emery 46 6000000 3000000 20 Coach Neil Banﬁeld 56 520000 100000 12 Coach Steve Bould 55 1560000 500000 16 Manager Vic Akers OBE 71 62000 100000 5 Manager Gary O’Driscoll 58 40000 20000 2 Doctor Andrew Rolls 38 41000 20000 2 Physiotherapist
3 Points to be Noted • You must follow composite pattern to complete this assignment. • Implementing the composite pattern should be your ﬁrst priority. Simply simulating the application logic without the correct application and implementation of design pattern does not make you eligible for a mark greater than zero.