Nested-if Statement (Java): Calculating a productivity bonus
Not what you're looking for?
Write a Java program making use of nested if statement, that calculates an employee's productivity bonus and prints the employee's name and bonus. Bonus is calculated based on an employee's productivity score as shown in table below.
Productivity score| Bonus
<=30| $50
31-69| $75
70-199| $100
>=200| $200
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.
Example:
Employee's name: Kim Smith
Number of shifts: 25
Number of transactions: 75
Transaction dollar value: 40000.00
For above given parameters, program should revert with following result.
Employee Name: Kim Smith
Employee Bonus: $50.0
Purchase this Solution
Solution Summary
Solution provides a well commented and self-explanatory Java program that can be compiled and executed at the console.
Solution Preview
Please find attached 637350_EmployeeBonus.java that implements the given requirement. This solution shows one way to do the things - moving up from 30 in if-else if-else if-else, but we could also achieve the ...
Purchase this Solution
Free BrainMass Quizzes
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
C# variables and classes
This quiz contains questions about C# classes and variables.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.