Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a java program which will prompt a user to input a product and its cost.Using a while loop that will run until the sentinel

Create a java program which will prompt a user to input a product and its cost.Using a while loop that will run until the sentinel value of "stop" (any case) is entered, the program will look for items with a cost greater than or equal to $100.00.The program will find the average cost of those items.

Start your program as follows:

Products that cost $100.00 or more

Enter theproduct ordered - type 'stop' to end: flat screen TV

Enter the cost of the product ordered: 599.90

Enter the product ordered - type 'stop' to end: HD cable

Enter the cost of the product ordered: 25.02

Enter the product ordered - type 'stop' to end: laptop

Enter the cost of the product ordered: 1202.25

Enter the product ordered - type 'stop' to end: external drive

Enter the cost of the product ordered: 102.40

Enter theproduct ordered - type 'stop' to end: stop

There were 3 item(s) that had a cost of $100.00 or more

The average price of items with a cost of $100.00 or more is $634.85

End of report

Process finished with exit code 0

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

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

Human brain is also known as the emotional brain?

Answered: 1 week ago

Question

This is the outer most carnival appendage?

Answered: 1 week ago