Write a program that plays the game of fermi

Assignment Help Programming Languages
Reference no: EM13992828

1.Write a program that plays the game of Fermi. The program generates three distinct random digits between 0 and 9. These digits are assigned to positions 1, 2, and 3. The goal of the game is for the player to guess the digits in three positions correctly in the least number of tries. For each guess, the player provides three digits for positions 1, 2, and 3. The program replies with a hint consisting of Fermi, Pico, or Nano. If the digit guessed for a given position is correct, then the reply is Fermi. If the digit guessed for a given position is in a different position, the reply is Pico. If the digit guessed for a given position does not match any of the three digits, then the reply is Nano. Here are sample replies for the three secret digits 6, 5, and 8 at positions 1, 2, and 3, respectively. Guess Hint Explanation 1 2 5 Nano Nano Pico The value 5 matches but at the wrong position. 8 5 3 Pico Fermi Nano The value 5 matches at the correct position. The value 8 matches but at the wrong position. 5 8 6 Pico Pico Pico All match at the wrong positions. Notice that if the hints like the above are given, the player can tell which number did not match. For example, given the hint for the second guess, we can tell that 3 is no one of the secret numbers. To avoid this, provide hints in a random order or in alphabetical order (e.g., it will be Fermi Nano Pico instead of Pico Fermi Nano for the second reply). Implement the program with an attractive and elegant GUI. (Java Problem). 

Reference no: EM13992828

Questions Cloud

What is the centripetal acceleration of an object : The radius of the earth is 6.3x10^4m and it completes one revolution in 1 day. what is the centripetal acceleration of an object located on the equator?
A group of statements bracketed : A group of statements bracketed by { }.A group of statements bracketed by { }.
Create a binary search tree program : Create a Binary search tree program using recursion for given array integer
Evaluate the advice kate received from her coworkers : Discuss a situation you have been in where you felt you were passed over for a promotion, made to feel indifferent, or were discriminated against. Compare and contrast your story with Kate's.
Write a program that plays the game of fermi : 1.Write a program that plays the game of Fermi. The program generates three distinct random digits between 0 and 9. These digits are assigned to positions 1, 2, and 3. The goal of the game is for the player to guess the digits in three positions corr..
How many mrem will a person recieve per year on the average : In a certain town the average yearly background radiation consists of 21.6 mrad of X-rays and gamma rays plus 3.62 mrad of particles having a QF of 6.29. How many mrem will a person recieve per year on the average?
Why would you expect the inflation rate : Why would you expect the inflation rate to accelerate if the actual unemployment rate declined to a level lower than the "full employment" unemployment rate (NAIRU) and remained at that low level for a year or longer? Explain your answer in a few ..
What is the new frequency if one increase the tension : What is the new frequency if one (a) increase the tension by a factor of 4 while keeping everything else constant (B) increase the length by a factor of 3 while everything else constant
How much potential energy would the spring store : How much potential energy would the spring store if it were stretched an additional 2.90 cm? How much potential energy would it store if it were compressed by 2.90 cm from its equilibrium position?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write application for university admissions office

Write an application for a university admissions office. Prompt the user for a student's High School Grade Point (for example 3.2) and an admission test score (value from 0 to 100).

  Write accessors for each of the declared class variables.

Read the file and display in the listbox each record splitting out the fields, eliminating the comma delimiters and placing spaces between the fields.

  Describe object-oriented databases.

Describe the database planning and development process. What steps are involved, and what tools may be appropriate or helpful?

  Write a program that instantiates four sphere objects

Write a program that instantiates four sphere objects (assigning a radius to each instance) and adds them to a pointer-based linked list. Include a function to display the statistics of each sphere in the list.

  Provide unoptimized-optimized prefix using recursive rule

Where the recursive rule uses concatenation of strings, so F2 is "ab", F3 is "aba". Note that the length of Fn is the nth Fibonacci number. Provide unoptimized and optimized ‘prefix' (fail) function for F7.

  Describe the necessary formulas and sample calculations

Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input

  What is the role of statistical analysis in simulation

How do pseudo-random numbers affect the accuracy of a simulation?

  Create a catch block that catches the exception

Write a C# console application in which you declare an array of five integers and store five values in the array.

  Define a class named document that contains an variable

Define a class named Document that contains an instance variable of type String named text that stores any textual content for the document. Create a method named toString that returns the text field and also include a method to set this value.

  Compare and contrast object-oriented languages

Compare and contrast object-oriented languages (Java, C++, C#, etc.) to imperative languages (C, Pascal, etc.) in terms of: Programmability Maintainability Performance Development tools Explain the use of scripting languages, such as JavaScript, PHP,..

  Find out probability at any given time user transmitting

Assume there are 20 users. Determine probability that at any given time, exactly n users are transmitting simultaneously. Determine the probability that there are 11 or more users transmitting simultaneously.

  Define and create an exception

Quotient throws an exception to the higher-level function main to decide whether or not the program should be terminated. Main catches the divByZero and prints out an appropriate comment on the screen. Also include in main a try block to catch the..

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