Question: Include another public method in the Employee class from Pencil and Paper Exercise 3. The method should calculate an Employee objects new salary, which is

Include another public method in the Employee class from Pencil and Paper Exercise 3. The method should calculate an Employee object’s new salary, which is based on the raise percentage provided by the program using the object. Before making the calculation, the method should verify that the raise percentage is greater than or equal to 0.0. If the raise percentage is less than 0.0, the method should assign the number 0.0 as the new salary.

Step by Step Solution

3.53 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

declaration section class Employee public Employee Employeestring dou... 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 An Introduction Programming Questions!