Random number generator guessing game, computer programming, Programming Languages

The GuessingGame class contains a skeleton for a program to play a guessing game with the user. The program should randomly generate an integer between 1 and 10 and then ask the user to try to guess the number. If the user guesses incorrectly, the program should ask the user to try again until the guess is correct. When the guess is correct, the program should print a congratulatory message.
1. Download the Lab13 from Blackboard and work with the GuessingGame class.
2. Using the comments as a guide, complete the play() method so that it plays the game as described above.
3. Modify the program so that if the guess is wrong, the program says whether it is too high or too low. You will need an if statement (inside your loop) to do this.
4. Now add code to count how many guesses it takes the user to get the number, and print this number at the end with the congratulatory message.
Posted Date: 3/13/2012 6:00:00 PM | Location : United States







Related Discussions:- Random number generator guessing game, computer programming, Assignment Help, Ask Question on Random number generator guessing game, computer programming, Get Answer, Expert's Help, Random number generator guessing game, computer programming Discussions

Write discussion on Random number generator guessing game, computer programming
Your posts are moderated
Related Questions
1)      Go to Start -> Programs->Accessories->Notepad. 2)      Start with a document type tag & an opening tag. Enter the given line in your doc.

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Extend the SpaceRocks game and provide a warp feature which allows the ship to jump to a random location to escape a rock. The warp feature is only activated once the shields have

Can you provide help in solving error problems, with my matlab project?

Write a pseudocode for a program that reads a temperature as a whole number from a user and outputs a “probable” season (winter, sprint, summer, or fall) depending on the temperatu

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim

Write a program to draw the truck following figure. The program should buttons to provide When the truck runs left wheels must rotate in the correct direction. Rotating whe

Hi I have an assignment for prolog languagle is it possible to get help

Write an assembly program that computes Fibonacci numbers 2-5. a. Assume Fib(0)=0 and Fib(1)=1. b. Store Fib(2) in EAX, Fib(3) in EBX, Fib(4) in ECX and Fib(5) in EDX. c. Use a LOO

Write a script called 'prob1.m' that solves for the variables y, and z in terms of a user inputed x. The variables y and z are defined as follows: y = x - 30                when