Question: here is what I have so far! need help adding user input to loop as instructed!! Must be written in JAVA!!! Please help!!! if working

 here is what I have so far! need help adding user

here is what I have so far!

input to loop as instructed!! Must be written in JAVA!!! Please help!!!need help adding user input to loop as instructed!! Must be written in JAVA!!! Please help!!! if working will upvote!!!!

Adding user input to the loop 1. Write a different kind of loop than in the previous steps that increments for every loop. 2. Prompt the user to enter the number of hotdogs they wish to purchase. Be descriptive in your user prompt, i.e., How many hotdogs to purchase or enter zero to exit? _ 3. Calculate the current price of the hotdogs (5.95 per dog) for the quantity ordered. 4 4. Then add a re-prompt the user to see if they want to order more hotdogs. _ 5. Now, setup the condition to exit if zero is entered by the user. 6. Keep a running total from all loops to know the total purchase price of all dogs ordered. Once the loop exits, print the number of loops, total, and average cost of the hotdogs. Test, trace, all different scenarios and validate the loop condition exits correctly. 8. Label the initializer, changer, condition in comments 9. Have your instructor check your work for credit. Instruction Initials Challenge: +5 Use any loop construct of your choice to: - generate the number of hotdogs up to 10 hotdogs possible using Math.random() number generator. - each time the loop body executes, print the number of hotdogs purchased, the loop number, the current price of the hotdogs purchased to the Console. Instruction Initials

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 Databases Questions!