Question: Topics: Getting started, variables, System.out, System.in , println, String.format Problem Specification For this programming assignment, you will be completing the implementation of a java program

Topics: Getting started, variables, System.out, System.in, println, String.format Problem Specification For this programming assignment, you will be completing the implementation of a java program for the checkout system of a grocery store which sells rice by pound for $1.25, eggs by the dozen for $14.75, and French bread by loaf for $2.75. Tax is 6.75%.Your program must first print out the following message on screen: Welcome to the checkout system of Awesome Grocery Store! Enter the weight of rice (in pounds): After the user enters the weight of rice using keyboard, your program will print out the following message on screen: Enter the number of dozens of eggs: After the user enters the number of dozens of eggs using keyboard, your program will print out the following message on screen: Enter the number of loaves of French bread: After the user enters the number of loaves of French bread using keyboard, your program will calculate the total cost of sold items excluding tax (called SUBTOTAL), total tax, and total cost including tax (called TOTAL) and print out the following message on screen: Here is your receipt: ********************* SUBTOTAL: $X TAX: $Y TOTAL: $Z where X is the subtotal, Y is the tax, and Z is the total represented in dollars. Each of these values should be displayed with a dollar sign and two digits after the decimal point.How to calculate subtotal, tax, and totalConsider the example where a user wants to print a receipt for 2.65 pounds of rice, 3 dozen eggs, and 5 loaves of French bread. Calculate the cost of the goods.cost of rice =2.65\times 1.25=3.3125 cost of eggs =3\times 14.75=44.25cost of French bread =5\times 2.75=13.75 subtotal = cost of rice + cost of eggs + cost of French bread =61.3125 Calculate the tax on the goods. tax =6.75/100\times subtotal =6.75/100\times 61.3125=4.13859375 Calculate the total cost.total = subtotal + tax =61.3125+4.13859375=65.45109375Example OutputFor a user who wants to generate a receipt for 2.65 lbs of rice, 3 dozen eggs, and 5 loaves of French bread, a successful program will output: Welcome to the checkout system of Awesome Grocery Store!Enter the weight of rice in pounds: 2.65Enter the number of dozens of eggs: 3Enter the number of loaves of French bread: 5Here is your receipt:*********************SUBTOTAL: $61.31
TAX: $4.14
TOTAL: $65.45
Submission
You need to submit a single file named GroceryStoreCheckout.java. The incomplete file is posted on Canvas along with this assignment specification. Grading Criteria Codereadability: 10%Using comments to explain logic: 10%Correctness of Java syntax (no compilation error): 10%Proper scan of System.in: 10%Proper usage of variables: 10%Correct calculations of subtotal, tax and total: 20%Program displays all required messages when given valid input: 10%Program displays numeric values to specification: 10%Passing all tests: 10%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!