Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

8. Providing support during instruction.

Answered: 1 week ago