Question
public class MasterMindEntry { private String playerEntry; public static String masterEntry; public MasterMindEntry(String playerEntry) { this.playerEntry = playerEntry; } public String getPlayerEntry() { return playerEntry;
public class MasterMindEntry { private String playerEntry; public static String masterEntry;
public MasterMindEntry(String playerEntry) { this.playerEntry = playerEntry; }
public String getPlayerEntry() { return playerEntry; } public String [] getPlayerEntryArray() { String entry = this.getPlayerEntry(); String [] entryArray = {"","","",""}; for (int i = 0; i
public void setPlayerEntry(String playerEntry) { this.playerEntry = playerEntry; }
public static String getMasterEntry() { return masterEntry; }
public static void setMasterEntry(String gameEntry) { MasterMindEntry.masterEntry = gameEntry; }
public String getFeedback() { if (this.playerEntry.equals(masterEntry)) { return "YYYY"; } else {
String feedback = ""; for (int i = 0; i
} } return feedback; } } public String [] getFeedbackArray(){ String feedback = this.getFeedback(); String [] feedArray = {"","","",""}; for (int i = 0; i
. Exercise 2: Mastermind or Master Mind is a code-breaking game for two players. One player becomes the code-maker, the other the code-breaker. The game rules of your program: The code-maker is the application. And it chooses a pattern of four code Letters as a subset of the following 7 alphabetic letters {A, B, C, D, E, F, G). The code cannot include duplicates and blanks. The chosen pattern is hidden by GUI. The code-breaker tries to guess the pattern in the right order in both orders, within twelve turns. Each guess is made by placing a row of code patterns on the decoding board. Once placed, the program provides feedback after each row of guess. Character Y feedback is placed for each code patters from the guess, which is correct in both character and position. X' feedback indicates the existence of a correct Character in the code but placed in the wrong position. Understand and complete the Project file for the application that provided by your instructor. . . Exercise 2: Mastermind or Master Mind is a code-breaking game for two players. One player becomes the code-maker, the other the code-breaker. The game rules of your program: The code-maker is the application. And it chooses a pattern of four code Letters as a subset of the following 7 alphabetic letters {A, B, C, D, E, F, G). The code cannot include duplicates and blanks. The chosen pattern is hidden by GUI. The code-breaker tries to guess the pattern in the right order in both orders, within twelve turns. Each guess is made by placing a row of code patterns on the decoding board. Once placed, the program provides feedback after each row of guess. Character Y feedback is placed for each code patters from the guess, which is correct in both character and position. X' feedback indicates the existence of a correct Character in the code but placed in the wrong position. Understand and complete the Project file for the application that provided by your instructor
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started