Generate a random 5 digit number as a string

Assignment Help JAVA Programming
Reference no: EM131591806

develop a number guessing game. The game program should:

Generate a random, 5 digit number as a string.

The player needs to try to guess this 5 digit number.

The program should provide feedback to the player letting them know if they got any of the digits correct, using the Feedback Key (or hints) below:1 = indicates Right Number, Right Place.2 = indicates Right Number, Wrong Place.0 = indicates Wrong Number.For example:
If the computer program generates 12345 as the random number.

The player needs to make guesses in order to figure out what the secret, random number is. If the player guesses 11235, the computer should respond with the feedback code of: 10221.

Repeat step 2 and 3 until the player guesses the whole 5 digit number correctly (or, you can allow the player to do 10, 15, 20 tries).

If the player guesses it correctly, display the message "You guessed it correctly!" If the player doesn't guess it within the limited number of tries, display the message "You couldn't guess it. Game over."

Reference no: EM131591806

Questions Cloud

Discuss the statistics on workplace violence : Discuss the statistics on workplace violence. Describe environmental designs that can reduce workplace violence.
What advantages or disadvantages of methods in nursing study : What advantages or disadvantages do you see in using both types of methods in a nursing study
Describe the challenges of succession planning : Describe the challenges of succession planning. Discuss the statistics on succession planning.
What is walter annualized holding period return : Assume that bond prices change instantaneously to reflect the new interest rate. What is Walter’s annualized holding period return?
Generate a random 5 digit number as a string : Generate a random, 5 digit number as a string - Repeat step 2 and 3 until the player guesses the whole 5 digit number correctly
Prepare income statement in the contribution margin format : Case Hardware sells tiling grout among other products. Using the given information, prepare an Income Statement in the Contribution Margin format
What the difference between positions and interests : What the difference between positions and interests? If in a recruitment negotiation, where a candidate is being offered a job and is negotiating employment.
Develop a listing of new hiv-aids educational strategies : Develop a listing of new HIV/AIDS educational strategies an agency can use in a general community. Be creative and come up with innovative ideas.
Discuss leadership and communication scenario : What communication strategies are associated with effective leadership

Reviews

Write a Review

JAVA Programming Questions & Answers

  Statements to create a collection of integers

Write Java statements to create a collection of integers, and to initialize each element of the collection to -1. Then, using a for each statement to print the value of each element.

  Computer science and information system

In the College of Computer Science and Information System, forty students were asked to rate the quality of teaching of his Course Instructor in the class room environment on a scale of 1 to 10 (1 means minimum standard of teaching and 10 means ex..

  Primary care-secondary care and tertitary care

Discuss the differences among primary care, secondary care, and tertitary care and the 6 C's of primary care

  Creating mapreduce program to calculatingpi

Creating MapReduce program to calculatingpi, Step 1: Generate an input file to the Pi MapReduce program and Create a regular Java program which accepts two command line arguments

  Functional abstraction

Question 1: What are some of the benefits of modularity? Question 2: What is functional abstraction? Question 3: What is information hiding?

  Paper on mobility-cdma and gsm

Discuss a minimum of three mobile web applications that are familiar or that you used regularly.

  Determine the percentage of vowels

Create a Java program that asks the user to input a sentence in any language, counts the number of vowels in the sentence, divides it by the total number of characters in the sentence.

  Write a credit card validation program

Write a Credit card validation program. Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits.

  Application that prompts the user to make choice for coffee

Create a UseTVShow.java file that prompts the user to input up to 5 TV shows and stores the data in an array of objects first, then displays them as a list.

  Mean and standard deviation write a program that reads a

mean and standard deviation. write a program that reads a set of floating-point data values from the input. when the

  Create the java code for a generic class

Create the Java code for a generic class. The class should contain at least one private data member of a generic type, a constructor which initializes the private data member to the value of a passed in argument, and a getter and setter for the ge..

  Write a recursive function that finds and returns the sum

Write a recursive function that finds and returns the sum of the elements of an int array. Also, write a program to test your function.

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