Add a method named GetNewSalary to the Worker class from Exercise 5. The method should calculate a

Question:

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.


Data From Exercise 5:

Write the class definition for a class named Worker. The class should include Private variables and Property procedures for a Worker object’s name and salary. The salary may contain a decimal place. The class also should contain two constructors: the default constructor and a parameterized constructor.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: