Answer:
import java.util.Scanner;
public class EmployeeBonus {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
String employeeName;
double numTransactions;
String transactString;
double numShifts;
String shiftString;
double dollarValue;
String dollarString;
double score;
double bonus;
final double BONUS_1 = 50.00;
final double BONUS_2 = 75.00;
final double BONUS_3 = 100.00;
final double BONUS_4 = 200.00;
System.out.println("Enter employee's name: ");
employeeName = s.nextLine();
System.out.println("Enter number of shifts: ");
shiftString = s.nextLine();
System.out.println("Enter number of transactions: ");
transactString = s.nextLine();
System.out.println("Enter transactions dollar value: ");
dollarString = s.nextLine();
numShifts = Double.parseDouble(shiftString);
numTransactions = Double.parseDouble(transactString);
dollarValue = Double.parseDouble(dollarString);
score = numTransactions / numShifts;
if (score <= 30) {
bonus = BONUS_1;
} else if (score >= 31 && score <= 69) {
bonus = BONUS_2;
} else if (score >= 70 && score <= 199) {
bonus = BONUS_3;
} else {
bonus = BONUS_4;
}
System.out.println("Employee Name: " + employeeName);
System.out.println("Employee Bonus: $" + bonus);
}
}