Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem Descr iption Using the steps for Problem Solving generate for the follow

ID: 3571246 • Letter: P

Question

Problem Descr iption Using the steps for Problem Solving generate for the following problem: a) test plan AND b) write and test the program code in Java. This problem will take your assignme nt 3 code breaker game and allow the player to choose the number code letters At the start of the game the player chooses: o The number of code letters between 1 and 20). o BONUS (pick one): Enter the number of tries AND the range of code letter values OR The secret code has no repeat letters, 20 tries AND the valid letters are AZ in a loop the program will (must contain the following steps in order) Ask for the guess (with retry and ignore If they enter quit, indicate that they lost and end the game Compare each of the entered letters to the code For each connect letter in the correct position, increment a counter If the above counter equals three, indicate that they won and endthegame o For each correct letter in the wrong position, increment a second counter Print the value of the two counters Note assignment 3 or the p rovided assignment 3 solution as starting point WARNING Do not use systen-exit recursion Sample output 1 (Rod indicates user entered information) How many letters in the code? 5 Welcome to CodeBreaker You have 6 tries to find the secret 5 letter code The letters range from A to E Good luck The code can have repeat letters Enter guess ai: abcdef Guess is too long Enter guess al: abcd Guess is too short Enter guess a1 Letter 5, I is not a valid letter Enter guess al 1 right letter in the right place 4 right letter in the wrong place Enter guess a2: edcba 2 right letter in the right place 3 right letter in the wrong place Assignment 44- Arrays Enter guess a3 cdabe 4 right letter in the right place 1 right letter in the wrong place Enter guess a4: coobe You win The code was CDDBE Sample output 2:

Explanation / Answer


How many letters in the Code
5
Enter the number of valid tries
20
Enter the letter range with space like A Z or A E
A E


Welcome to CodeBreaker
You have 20 tries to find the secret 5 letter code
The letter range from A to E
Good Luck
The Code can have repeat letters
Enter Guess #1:
abcde
0 right letter in the right place
4 right letter in the wrong place
Enter Guess #2:
ecbad
1 right letter in the right place
3 right letter in the wrong place
Enter Guess #3:
ecabd
2 right letter in the right place
2 right letter in the wrong place
Enter Guess #4:
ceadb
1 right letter in the right place
3 right letter in the wrong place
Enter Guess #5:
ecabd
2 right letter in the right place
2 right letter in the wrong place
Enter Guess #6:
ecdab
1 right letter in the right place
3 right letter in the wrong place
Enter Guess #7:
ecadb
2 right letter in the right place
2 right letter in the wrong place
Enter Guess #8:
eacdb
0 right letter in the right place
4 right letter in the wrong place
Enter Guess #9:
ecabd
2 right letter in the right place
2 right letter in the wrong place
Enter Guess #10:
dcade
2 right letter in the right place
1 right letter in the wrong place
Enter Guess #11:
dcabe
2 right letter in the right place
2 right letter in the wrong place
Enter Guess #12:
bcade
3 right letter in the right place
1 right letter in the wrong place
Enter Guess #13:
bcaad
3 right letter in the right place
1 right letter in the wrong place
Enter Guess #14:
bcadd
3 right letter in the right place
0 right letter in the wrong place
Enter Guess #15:
bcaed
4 right letter in the right place
0 right letter in the wrong place
Enter Guess #16:
bcaea
You Win
The Code was bcaea

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote