You are required to represent the employees at a company in Java code. The employees are categorized according to their position and salary. You also need to be able to change the state of an employee due to a promotion. How could you represent this?

  1. Create a Salary object

  2. Declare an Employee class

  3. Declare an instance of the Employee class called Promotion

  4. Declare a promotion method that changes the value of the position variable

  5. Define variables for position and salary


Correct Option: B,D,E

Find more quizzes: