Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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: cookie

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_2

Step: 3

blur-text-image_3

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

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions