Question: Add a method named GetNewSalary to the Worker class from Exercise 5. The method should calculate a Worker objects new salary, which is based on

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.

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Public Function GetNewSalaryByVal dblRate As D... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming with Microsoft Visual Basic 2015 Questions!