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
Access Modifiers Convenience Modifiers or we can say (Access Specifies) identifies as the opportunity of accessibility of an Item and its associates. All C# kinds and kind associat

I need to finish my game project within two weeks using XNA. Would you guys can help me to finish it? Thank you

about how to create the program in c

The aim of this task is to gain experience in using the popular Web languages XSLT, XQuery, DTD, XML Schema and RDF. The Content: The University is organizing a stage show wh

An apartment complex has several apartments to rent. The apartments are all similar, and all rent for $750 per month. Currently, all units are occupied. The management, being in bu

Create a Money data structure that is made up of amount and currency.  (a) Write a constructor for this data structure   (b)  Create accessors for this data structure (c)

ADO. NET ADO.NET (ActiveX Information Things for .NET) is a set of programs elements that developers can use to accessibility data and data solutions. It is an element of the platf

The last matrix operation which we'll see is matrix multiplication. Now there we will start along with two matrices, A nxp and B pxm . Remember hat A must have similar number of c

Write a function called threshold1 (in a file called 'threshold1.m'. The function takes three arguments. The first two are arbitrarily sized arrays, A and B, and the third is a pos

fow to I write a emplate that reads a set of numbers typed at the keyboard into an array of T