Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started