Question: Consider the following number - guessing game. A target integer chosen from 0 to ( inclusive ) is known only to the referee. A player

Consider the following number-guessing game. A target integer chosen from 0 to (inclusive) is known only to the referee. A player is given chips and can ask a series of questions to identify the unknown integer as long as a chip is available. Each question must be presented in the form Is the target integer less than ? where is an integer. The referee will answer the question with either a Yes or a No. The referee will always tell the truth. Each Yes costs the player one chip, while a No costs the player nothing. Design a Java program to calculate the minimum number of questions needed to identify any target number for a given and number of chips . As input arguments, your program should take in values of and and output the minimum number of questions needed in the worst case. The following command nds the minimum number of questions needed for =32 and =3 java -jar Guess.jar 3320 and returns the following: Yixin Chen For a target number between 0 and 32, with 3 chips, it takes at most 6 questions to identify the target number in the worst case. Specic requirements of the project include: 1. Use the dynamic programming technique to design your program. (20 pts) Explain in English your design and present pseudo code (4pts). Dene the optimal substructure (4pts), i.e., recurrence. If your program passes all the test cases, you will receive 8 pts. Additionally, 4pts will be awarded for a bottom-up implementation. 2. Make an interactive game where a user is a referee, and the program will guess the target integer with the minimum number of questions. (Bonus Points: 4 pts) Please submit a report, JAVA source code and .jar le to Blackboard before Friday, Nov. 22nd,2024.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!