XYZ Hazard Control

Company XYZ has a hazard control model and a few employees. For the employees, there are two project leaders Chuck and Denise, and two supervisors Jack and Jeff. Jack supervises regular workers John, Mary, Jane, Tom and Nick. Jeff supervises workers Rob, Ed, Rick and Michael. Chuck leads workers Joe, Frank, Sam and Greg. Denise leads workers Amy, Wil, Nancy and Adam. Bob is the manager of Jack and Jeff, while Rachel is the manager of Chuck and Denise. The company CEO is Steve.

 

Let the five job titles be ranked in this hierarchical level from top to bottom as CEO, manager, project leader, supervisor, and regular worker. Each person is assigned with a head person if that person’s job title is a higher rank. In other words, CEO has no head person and can be a legitimate head person to a lower rank direct subordinate like manager, project leader, supervisor, or regular worker. When an employee sees a danger, the issue is reported to his/her assigned head person. If the head person is a project leader or supervisor, the person will announce the danger to all his/her direct subordinates and report it to his/her head person. If the head person is a manager, the person will gather information from all his/her direct subordinates who are project leaders or supervisors and then contact the CEO. The CEO will throw a meeting demanding all managers to come up with a set of decisions. The CEO will randomly pick one of the decisions.

 

Please develop a system to model the following scenario in order. John observes a gas leak of a big tank and triggers method "void seeDanger()" to report it to his supervisor. The supervisor runs "void seeDanger()" to tell all his subordinates to perform fixIt() and also informs his manager. The fixIt() method prints out a message like "The person [name] is fixing it." The manager runs "void seeDanger()" to handle the danger by gathering information from all supervisors under his management and execute "void contactBoss()" to inform CEO. Each supervisor or leader has a "String provideInfo()" method, saying "Information from [name]". Supervisor Jeff always sends Rob and Rick to support the other team that encounters an incidence, i.e., these two guys perform fixIt() for the other team. The CEO run "void seeDanger()" to throw a meeting to discuss with the managers, and collect suggested decisions from individual managers who perform their implemented "Decision suggestedDecision()" method. The CEO grants the final decision by method "Decision grant(Decision[] da)".

 

The CEO receives one decision from each manager. He randomly grants a decision that he receives. The doIt() method in the final decision object is invoked. The decision displays "The city’s environmental department is notified" and demands all persons in the company to evacuate. The evacuation is broadcasted from CEO to all others in a cascading style following a breadth first search tree structure. The CEO will notify the managers in order, who will each notify their supervisors or leaders, who will each notify the regular workers under supervision. The evacuation procedure will start from bottom up. Basically, the regular workers leave first, then the supervisors or leaders, next the managers, and finally the CEO. Basically, a person’s evacuate() method is called to evacuate and the method displays "The person [name] is evacuating".

 

Please provide the design in UML and point out the applied design pattern(s). Note that a regular worker in the future may be assigned with a different supervisor, who may be assigned with a different manager. The design should be flexible in this aspect. Implement in C#.

Need a custom answer at your budget?

This assignment has been answered 5 times in private sessions.

© 2024 Codify Tutor. All rights reserved