Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in Java! and put comments explaining because im trying to learn! Use Firstname wherever you see Fn Write a program to calculate the

Please do in Java! and put comments explaining because im trying to learn!
image text in transcribed
Use Firstname wherever you see Fn Write a program to calculate the total price of items one customer buys at an express lane of a grocery store. The function should be called as calcTotalPriceFn() ( where Fn is your first name). You have to submit only the function. - To go through an express lane a customer has to have at least one item. - To go through an express lane a customer has to have less than or equal to ten items. - Create an array of length 10 called priceFn of all the prices in dollars and add each price to the array. - Use a do - while loop to ask the prices of the items - Once the price is added ask the user "Do you have more items?" - If the response is "Yes", ask the user for price of next item. - If the response is anything other than "Yes" exit the loop. - You need to have a counter which indicates the number of items bought. - Once the counter becomes 10 , need to exit the loop using a break command as the maximum items that can be bought in the express lane is 10. Once you exit the loop: - At this point you will have the array priceFn of prices. - Using the counter add the prices of the items bought and add a tax of 7\% to the total and display the total price of groceries bought

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago