Decorating Employee Objects

Write a Java program that uses decorator classes to add capabilities to employees. In a typical company, an employee will be asked to perform a number of duties, such as Department Head, Safety Coordinator, Recruiter, or Community Liason. You should have additional ones besides those. Your Java program will create Employees and then decorate these employees at runtime.

Create an abstract class named Employee, with last name and description fields, and a getDescription() method. Create a concrete class named SalariedEmployee that extends Employee. Create an abstract class named ResponsibilityDecorator that is able to decorate an employee and return the employee's responsibility as a string. It will have an abstract getDescription method. Create some job category classes that extend the ResponsibilityDecorator class and implement the getDescription() method.

In your main test program, create at least 5 Employee objects and pass them to the constructors of each of your decorator classes. The first employee should be you so use your last name. Then, print each Employee by calling its getDescription() method. All employees should not have the same number of responsibilities. The program's output should look something like this for each :

[LastName]: Manager, Recruiter, CommunityLiaison, ProductionDesigner

Of course, you print the person's name where the "[LastName]" placeholder is shown. The brackets should not be included.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.