Question: This lab will be an extension of Lab 2 . Add a new functionalityAdd functionality to calculate different types of compensation based on the role.

This lab will be an extension of Lab 2. Add a new functionalityAdd functionality to calculate different types of compensation based on the role. For example, a Manager might get a performance-based bonus, whereas an Engineer might get a project-based bonus. This should follow the OCP principle.Enhance the BonusStrategy introduced in Lab 2 to handle different bonus structures for different employee roles. Implement strategies like:PerformanceBonusStrategy (for Managers)ProjectBonusStrategy (for Engineers)FixedBonusStrategy (for other roles)Refined Reporting:Extend the ReportGenerator class to handle report generation based on roles and departments. Ensure that this class can generate reports for specific roles or departments.Interface Enhancements:You will continue to use specific interfaces like Printable, Compensable, etc.. and extend them for handling role-specific logic, ensuring adherence to ISP (Interface Segregation Principle).Role-Specific Behaviors (Enums):Add role-specific behaviors using enumerations. For example, different roles may have different working hours or team sizes, and these should be reflected using enums and role-specific behavior classes.Define an enumeration Department to categorize employees by their department, this enum must have IT, Engineering, HR, sales and marketing. Define an enumeration Role to classify employees by their role, this enum will have Manager, Engineer, HR_Representative and Sales Person.Submission:Upload the following files:person.javaEmployee.javaManager.javaBonusStrategy.javaReportGenerator.javaEmployeeFactory.javaTo achieve bonus points Add another enum (+1 point)Add another interface other than Printable, Compensable and extend them to a logic (any logic)(+1 point)Include a screenshot(s) of the output from your IDE.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!