Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In java Lab6A (Warmup): You may have played a game called Stop Repeating Yourself' when you were a kid. The premise of the game is
In java
Lab6A (Warmup): You may have played a game called "Stop Repeating Yourself' when you were a kid. The premise of the game is you repeat the phrase "Stop Repeating Yourself" over and over again to annoy the other person. We will write a program similar to this game. For this lab, you will prompt the user for input. If the user enters anything other than cookie, the program will respond with Gimme a cookie. To make the program stop running, the user needs to enter "cookie". You need to write this program using a do-while loop. You will receive no credit if you use a for" or "while loop to solve this problem. Hint: Remember how to compare strings! The sample run is shown below. User input is in bold. Sample output: Gimme a cookie: who is this? Gimme a cookie: I'm not joking Gimme a cookie: What is going on? Gimme a cookie: help Gimme a cookie: cookieStep 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