Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java format please implement a class called Employee. An employee has a name and gets a salary. Every pay period each employee gets an

In java format please

implement a class called Employee. An employee has a name and gets a salary. Every pay period each employee gets an additional amount in bonus. In your solution, include a constructor that accepts the name and salary of an employee. Provide a mutator method that accepts the bonus amount and adds it to the salary. Provide necessary accessor methods to return the name, the salary before the bonus was applied, the bonus, and the salary after the bonus has been applied. Write a test class called TestEmployee to produce output similar to the one below.

image text in transcribed

AS CREA ABC Payroll Employee Employee name : John Brown Salary before bonus : $45000.0 Bonus amount : $1000.0 Salary after bonus : $46000.0 Employee Employee name : Mary Jane Salary before bonus: $65000.0 Bonus amount : $800.0 Salary after bonus : $65800.0 Report End--- Press any key to continue

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

What is the principal advantage of curvilinear forecasting?

Answered: 1 week ago