Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started