A department store awards cash-value coupons depending on ho…

A department store awards cash-value coupons depending on how much a customer spends on merchandise.  For example, if you spend $50, you will get a coupon worth 5% of the amount spent or $2.50. Write the selection statement necessary to calculate and determine the percentageEarned and the actual couponValue the customer will receive based on the amountPurchased (must be a positive amount) entered by the user. couponValue = amountPurchased * percentageEarned a. Get amountPurchased from the user. You can choose to do with or without a message. Assume the input is a positive double data type. b. Use these given variable names and the following rate table in your calculations. c. If user spends $50, your output should look like: Your coupon percentage is 5% and your coupon value is $2.50. Format the couponValue to 2 decimals places in your output. Amount purchased Coupon percentage Less than $20.00 inclusive No coupon earned $20.00 to $50.00 inclusive 5% $50.00 to $100.00 inclusive 7% $100.00 to $150.00 inclusive 10% Over $150 15%

The Fast Freight Shipping Company delivers packages based on…

The Fast Freight Shipping Company delivers packages based on the package weight.  Write the selection statement necessary to calculate and determine the value of totalShippingCharges, when provided the weightKg of the package in kg (as a positive number) from the user. totalShippingCharges = weightKg * ratePerKg a. Get weightKg from the user. You can choose to do with or without a message. Assume the input is a positive double data type. b. Use these given variable names and the following rate table in your calculations. c. Output the value of totalShippingCharges. Format the output to 2 decimals places. Weight of package in kg Rate/cost per kg Less than 2.0 $1.50 2.0 (inclusive) to 7.0 $2.75 7.0 (inclusive) to 11.0 $4.25 11.0 (inclusive) to 20.0 $5.85 Over 20.0 (inclusive) Fixed flat fee of $125.00  

Write a Java program that displays the class duration based…

Write a Java program that displays the class duration based on the day of the week. The program should ask the user to enter a number corresponding to the weekday (1 for Monday, 2 for Tuesday, 3 for Wednesday, etc.). Based on the input, the program should output the class duration as follows: a. If the input is 1, 3, or 5, print “50 minutes.”b. If the input is 2 or 4, print “75 minutes.”c. If the input is 6 or 7, print “No class.”d. For any other input, print “Wrong input.” Use switch statements to implement this logic.