Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in java A construction company wants to keep a record of the employees working in it. There are permanent employees as well as

Please do in java
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
A construction company wants to keep a record of the employees working in it. There are permanent employees as well as contract employees. Contract employees work on an hourly basis whereas permanent employees are paid monthly salary. An application needs to be developed for the company for storing the employee details. Implement the classes based on the class diagram and description given below. imply employed employme String a double los templetame Sing olevaid deployed invold gel amely String an employeeone Singid an Slid beca de be controve word rence Method Description Employee Employee(int employeeld, String employeeName) Initialize the employeeld and employeeName instance variables appropriately with the values passed to the constructor Implement the getter and setter methods appropriately. Permanent Employee . PermanentEmployee(int empId, String name, double basicPay, double hra, float experience) Initialize the employeeld, employeeName, basicPay, hra and experience instance variables appropriately with the values passed to the constructor. calculateMonthlySalary() Calculate the salary of the employee using the formula given below, salary = basic pay + hra + variable component Variable component is calculated based on the employee's experience according to the table given below. Experience (in Years) % of the basic pay 3 and 5 5 >5 and -10 12 Implement the getter and setter methods appropriately, ContractEmployee Contract Employee(int empld, String name, double wage, float hoursWorked) . Initialize the employeeld, employeeName, wage and hoursWorked instance variables appropriately with the values passed to the constructor calculate Salary() Calculate the salary of the employee using the formula given below. salary hours Worked "wage Implement the getter and setter methods appropriately Test the functionalities using the provided Tester class. Input and Output For PermanentEmployee Input Instance variables Values 711211 employeeld employeeName Rafael basicPay $1850 hra $115 experience 3.5 Output Hi Rafael, your salary is $2057.5 For Contract Employee Input Instance variables Values employeeld 102 employeeName Jennifer wage $16 hours Worked 90 Output Hi Jennifer, your salary is $1440.0

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

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions

Question

Explain the market segmentation.

Answered: 1 week ago

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago

Question

Question May I set up a Keogh plan in addition to an IRA?

Answered: 1 week ago