Problem

Understanding Nested if Statements In this lab, you complete a prewritten Java program...

Understanding Nested if Statements

In this lab, you complete a prewritten Java program that calculates an employee's productivity • bonus and prints the employee's name and bonus. Bonuses are calculated based on an -employee's productivity score as shown in Table 4-4. A productivity score is calculated by first dividing an employee's transactions' dollar value by the number of transactions and then dividing the result by the number of shifts worked.

1. Open the file named EmployeeBonus.java using Notepad or the text editor of your choice.

2. Variables have been declared for you, and the input statements and output statements have been written. Read them over carefully before you proceed to the next step.

3. Design the logic and write the rest of the program using a nested if statement.

4. Compile the program.

5. Execute the program entering the following as input

Employee's name: Kim Smith

Number of Shifts: 25

Number of transactions: 75

Transaction dollar value: 40000.00

6. Your output should be:

Employee Name: Kim Smith

Employee Bonus: $50.0

You cannot control the number of places that appear after the decimal point until you learn more about Java in Chapter 9 of this book.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 4
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT