Question: Program a Java Program that can be used to calculate the average weekly and monthly grocery bill for a family of four: Prompt the user

Program a Java Program that can be used to calculate the average weekly and monthly grocery bill for a family of four:

  • Prompt the user for the coupon amount as a decimal (example, .10).
  • Ensure the value is set to 10% if the value exceeds 100% or is less than or equal to zero.
  • Prompt the user for 2-4 weeks of grocery bills.
  • Calculate the monthly and weekly average for groceries.
  • Display monthly total and weekly average without the coupon.
  • Display monthly total and weekly average with the coupon.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is the Java program that fulfills the given i... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!