Question: 6. Add a method named GetNewSalary to the Worker class from Exercise 5. The method should calculate a Worker objects new salary, which is based
6. Add a method named GetNewSalary to the Worker class from Exercise 5. The method should calculate a Worker object’s new salary, which is based on a raise percentage provided by the application using the object. Before calculating the new salary, the method should verify that the raise percentage is greater than or equal to 0. If the raise percentage is less than 0, the method should assign 0 as the new salary.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
