Question: Help me with the JAVA assignment using the getter and setter method. Create a class Employee with following attributes in private scope; long empNo; String

Help me with the JAVA assignment using the getter and setter method.

Help me with the JAVA assignment using the getter and setter method.

Create a class Employee with following attributes in private scope; long empNo; String name; String designation; double basicPay; Create the default as well as parameterized constructor for the Employee class. Also create getter and setter for the above attributes. In the main method, create an employee object and set the value for above employee attributes. Create a method generateSalaryslip() to print the salary slip for the employee in the following format; ABC Company Salary Slip Month : Jan Year : 2021 Emp Id : 1001 Designation : Consultant CCA : 150 Tax : 135 Name : Anto Basic Pay: 1000 HRA : 200 Net Salary: 1215 where; CCA is the 15% of basic pay. HRA is the 20% of basic pay. Tax is the 10% of (Basic pay+CCA+HRA) Net Salary is the difference between (basic pay+CCA+HRA)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!