This is for Java please follow the instructions on given practice excercise
Page Objective This assignment will demonstrate your knowledge of loops, classes, methods, and Java data types About You will write a Java program to play the game of Pico, Fermi, Bagel Rules: Here are the rules of the game 1. The computer will generate a "secret* three digit number at random. 2. The first number will not be 0, and all the digits will be different 3. The user tries to guess the number If the user guesses correctly, then the game is over If not, the computer gives a hint and the player tries again. . Hints: . For each digit that matches the secret number in the proper place, the computer prints Fermr For each digit that matches, but not in the proper place, the computer prints "Pico .If none of the digits match, the computer prints "Bagels Examples (If the program generated the secret number 482): Hi, I have a number on mind, guess that number? guess -637. Bagels quess -381, Fermi guess 382. Fermi Fermi guess 832, Fermi Pico quess 328, Pico Pico quess 428. Fermi Pico Pico guess 482, Winner! Game is over) When the game is over, the results are printed: whether the user won or quit, and the number of guesses made To avoid making it too easy for the player, you shoukd print all Fermis first, and then the Picos, for each guess To avoid making it too difficult, print all guesses and hints to System out so the user can scroll through them. Your Bagels class will have only one public method, playGame () This method will call three other methods to 1. Generate the secret number 2. Determine whether the curent guess is a winner 3. Evaluate the current guess and print hints Page Objective This assignment will demonstrate your knowledge of loops, classes, methods, and Java data types About You will write a Java program to play the game of Pico, Fermi, Bagel Rules: Here are the rules of the game 1. The computer will generate a "secret* three digit number at random. 2. The first number will not be 0, and all the digits will be different 3. The user tries to guess the number If the user guesses correctly, then the game is over If not, the computer gives a hint and the player tries again. . Hints: . For each digit that matches the secret number in the proper place, the computer prints Fermr For each digit that matches, but not in the proper place, the computer prints "Pico .If none of the digits match, the computer prints "Bagels Examples (If the program generated the secret number 482): Hi, I have a number on mind, guess that number? guess -637. Bagels quess -381, Fermi guess 382. Fermi Fermi guess 832, Fermi Pico quess 328, Pico Pico quess 428. Fermi Pico Pico guess 482, Winner! Game is over) When the game is over, the results are printed: whether the user won or quit, and the number of guesses made To avoid making it too easy for the player, you shoukd print all Fermis first, and then the Picos, for each guess To avoid making it too difficult, print all guesses and hints to System out so the user can scroll through them. Your Bagels class will have only one public method, playGame () This method will call three other methods to 1. Generate the secret number 2. Determine whether the curent guess is a winner 3. Evaluate the current guess and print hints