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
Question 1: a) Assume that B is an array of 50 words; write a code which will place the smallest integer of array B in register AX. b) Write a small code (only three instr

XYZ International is a large Institute; Management in this institute wants to create Proper Student management System. There for they contact you and asked you to create Propto typ

1. Write a shell script to locate executable files. This script takes a list of file names from the command line and determines which would be executed had these names been given a

Question: (i) What is multithreaded programming? Lists the benefits achieved by multithreading your code in a program. (ii) What type of coding should be eliminated when d

i neeed an CGI Script that send mass emails i need this input fields Sender Name: Sender Email: Subject: Message: choose (HTML Or text ) , by default HTML Emails and send bu

Topic Develop a Web site that will provide information about your organization. The Web site will need to have a user-friendly interface for users to enter their information;

System.in and System.out should not be used anywhere in the programs except in main and only for testing purposes.  All calculations should be done in a method.  Note:  To use J

Write and test a simple perl program on the linux platform.  You may use any linux system you wish, including the Suse linux installed in the lab. Activities. Note:  to r

what is java

These are the specifications for your Perl program: 1. The file containing your program must be named cookiemgr.pl 2. It must be invoked as: cookiemgr.pl cookies_file [options]