Question: Make an api that checks the guess word for Wordle against the correct word ad return information for each letter of the guess word. green-

Make an api that checks the guess word for Wordle against the correct word ad return information for each letter of the guess word.

green- correct letter in the correct position

yellow- correct letter

grey/gray - incorrect letter

inputs: correct word, guess word (both strings)

output: green, yellow or grey.gray for each letter of the guess

oxide(correct word)/short( guess word)= GREY, GREY,YELLOW,GREY,GREY

public class Problem3 { public enum Result {GREEN, YELLOW, GREY} private String correctWord; Problem3(string correctWord){ this.correctWord = correctWord; } public Result[] check (String guess){ } public static void main (String[] args){ Problem3 solution = new Problem3("OXIDE"); Result[] result = solution.check("SHORT"); } } 

Step by Step Solution

3.36 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres an implementation of the Problem3 class that checks the guess word against the correct word in ... View full answer

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!