Create a class called Employee that includes three pieces of information as instance variables—a first name (typeString), a last name (typeString) and a monthly salary (double).Provide a set and a get method for each instance variable.Keep in mind you should get values from user.There should be a method called calculateSalary() witch deducts the income tax from the salary on the following basis: 20% income tax if the salary is above Rs 30000. 15% income tax if the salary is between Rs.20000 and Rs.30000. 10% income tax if the salary is below Rs. 20000. Write a test application named EmployeeTest that demonstrates class Employee’s capabilities. Create Employee objects and display each object’s full name ,salary , income tax and net salary of employees.
Note: This is a Java program question.
Create a class called Employee that includes three pieces of information as instance variables—a first name (typeString), a last name (typeString) and a monthly salary (double).Provide a set and a get method for each instance variable.Keep in mind you should get values from user.There should be a method called calculateSalary() witch deducts the income tax from the salary on the following basis:
20% income tax if the salary is above Rs 30000.
15% income tax if the salary is between Rs.20000 and Rs.30000.
10% income tax if the salary is below Rs. 20000.
Write a test application named EmployeeTest that demonstrates class Employee’s capabilities. Create Employee objects and display each object’s full name ,salary , income tax and net salary of employees.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images