Question: write a java program class salary and a constructor for the class. The program reads the salary of an employee. Write method. Public static double
write a java program class salary and a constructor for the class. The program reads the salary of an employee. Write method. Public static double NetSalary(doublesalary). That returns (prints) the net amount of salary after all deductions. The employee's salary is user input and pass it when calling the method. the method should check the salary and return the net salary considering the tax follows:
If the salary is more than 100,000 the income tax is 25%
if the salary is between 50,000 and 100,000 the income tax is 20%
if the salary is less than 50,000 the income tax is 15%.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
