Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can only code in the answer method. Cannot make any changes to the other methods. For the question below assume the following implementation of the
Can only code in the answer method. Cannot make any changes to the other methods.
For the question below assume the following implementation of the Employee class public static class Employee{ public int ID; public int getID() { return ID; 7 } 8 9 public int getTimesCalled() { 10 return timesCalled; 11 } 12 13 public void setID(int employeeID) { 14 this.ID = employeeID; 15 } 16 17 }// End Employee The following code will be executed before the code you'll write. You will be able to reference e1 and e2 as variables in your code. Employee el = new Employee(); 2 Employee e2 = new Employee(); el.setID(123); 4e2.setID(456); el = e2; For this question, assign the variable el to an employee object with an ld of 555 without changing the value referenced by e2. Your Answer: UW N 1 public void answer() { 2 el.setID(555); 3 e2.getId(); 4} 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started