Question: You will implement 2 different patterns. Design Pattern 1 - Facade Pattern Implement the Facade Pattern to simplify your application's interaction with various subsystems. The
You will implement different patterns. Design Pattern Facade Pattern Implement the Facade Pattern to simplify your application's interaction with various subsystems. The Facade will provide a simple interface for adding employees, generating reports, and calculating bonuses.Create an EmployeeManagementFacade class that will provide highlevel methods for:Adding an employee.Assigning a department and role to the employee.Generating reports based on employees' roles or departments.Calculating total compensation salary bonus for a given employee.This will encapsulate the complexity of interacting with different subsystems eg EmployeeFactory, ReportGenerator, and BonusStrategy into a simple interface.HINTEmployeeManagementFacade facade new EmployeeManagementFacade;facade.addEmployeeJohn Doe", Main StE Department.IT Role.ENGINEER, ;facade.generateReportByDepartmentDepartmentIT;Design Pattern Decorator PatternImplement the decorator pattern to add behavior dynamically to employees or managers without modifying their existing class. System.out.print allow you to "decorate" employee objects with additional responsibilities, such as performance reviews or certifications.Create a CompensationDecorator class that will extend the functionality of the Employee class.Implement concrete decorators such as PerformanceReviewDecorator and CertificationDecorator.These decorators will add new responsibilities to employees eg a performance review score or special certifications that may influence their total compensation.HINTEmployee employee new EmployeeAlice Oak StE Department.ENGINEERING, ;Employee decoratedEmployee new PerformanceReviewDecoratoremployee;decoratedEmployee new CertificationDecoratordecoratedEmployee "AWS Certified";System.out.printlnTotal Compensation: decoratedEmployee.calculateTotalCompensation;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
