Random number generator guessing game, computer programming, Programming Languages

Assignment Help:
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.

Related Discussions:- Random number generator guessing game, computer programming

Create single page to demonstrates an xhtml form, Create a single page that...

Create a single page that demonstrates an XHTML form. The form should include all the fields you feel are necessary for submitting an order of books and must include at least one

Discuss on unix kernel components, Question 1 Discuss on UNIX kernel co...

Question 1 Discuss on UNIX kernel components 2 Explain process creation and process termination 3 When do a Deadlock occur? What are the Necessary Conditions for Deadlock

Included applications, Hi, Can any of you, tell me how to use Included Ap...

Hi, Can any of you, tell me how to use Included Applications?

Looping, You are required to develop a program that calculates the charges ...

You are required to develop a program that calculates the charges for DVD rentals, where current release cost RM3.50 and all others cost RM2.50. If a customer rents several DVDs, e

Java virtual machine, Expertsmind.com is expert in java assignment help ...

Expertsmind.com is expert in java assignment help JAVA Virtual Machine A Java exclusive device or java virtual machine (JVM) is an exclusive device able of undertaking Jav

Shell script to print multiplication table of given number, Normal 0 ...

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

Matlab, ,how to write matlab program for fast decoupled method

,how to write matlab program for fast decoupled method

Assembly TASM or MASM, I need help with making a assembly program that uses...

I need help with making a assembly program that uses Hoffman''s coding scheme to compress a text file.

Develop a socket program in unix, Develop a socket program in UNIX/Linux th...

Develop a socket program in UNIX/Linux that uses (i) TCP as the transport protocol and  (ii) UDP as the transport protocol for transferring  a short message between a client and  s

Program to change date format, Write a program that accepts a date from the...

Write a program that accepts a date from the user in the form mm/dd/yyyy and then displays it in the form month dd, yyyy, where month is the name of the month. Enter a date (mm/d

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd