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
maake a programme in C of HR system

,how to write matlab program for fast decoupled method

Given a list of numbers, say my @input_numbers = (1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144); write a program map1.pl that will use the function map (a) to produce a list of

question 1: In the opening lecture I spoke about general changes in business - flatter organizations, process orientation as opposed to functional silos, focus on supply chains, gr

The program output is intended to be parsed by a script working on the log file or correlated in a spreadsheet.  Use the "csv" format (you will have to research "what" is a "csv" f

Write a Prolog predicate  has_duplicates(L)  that is true if list  L  contains duplicated elements (that is at least 2 copies of an element). For instance: ?- has_duplicates([a,

I need an application that will gather data from one SQL Database and update another. Data is contained in dbo.CallList with following fields: Customer_ID, AlreadyPickedUp, Phone_N

How Can I Retrive Unicode CSV File the ADO.net VB.net

Write a program that takes integer array of 8 elements from user and find the smallest element among them using pointers

Question 1- In engineering applications it is often necessary to fit a straight line to a set of N points with known coordinates (xi, yi), where i indexes the points (N in total).