Puzzle.Java program

it’s due February 7th, 12:00am (midnight).

6:28
Take Quiz
Exit
That right! The value of a regression test is that
it can be quickly run to ensure that new code
hasn’t caused or uncovered bugs in existing
code.
For example, the Linux Test Project includes
over 3000 regression tests for the Linux kernel.
That’s a lot of automated testing!
O an inadequate test
O a program that automatically refactors our code
O a test of git’s ability to checkout earlier commits
Question 6
0.13 / 1 pts
Match the jdb command with its function.
step
execute the cur
next
print the value
stop
print source coi
list
stop as soon as
fields
stop when an e
catch
print the value
watch
stop when the
print
stop as soon as
Quiz Score: 3.73 out of 6
Five Times Fun – A Wordle Clone
Due Tuesday, February 8 at 8 a.m.
CSE 1325 – Spring 2022 – Homework #3 – Revision 1 – 1
Assignment Background
Wordle is a very popular web-based game at the moment (https://www.powerlanguage.co.uk/wordle/). The
game preselects a secret 5-letter word, and gives you 6 tries to guess it. After each guess, letters that are in
the correct position turn green; letters in the word but in the wrong position turn yellow; and letters not in the
word at all turn grey.
The logic behind the game is quite simple – simple enough that you can write your own Wordle clone. But
since Wordle is a 6-letter word, we’ll call ours Quint instead.
Full Credit
In your git-managed cse1325 directory cse1325/P03/full_credit, create a class-centric Java program that
implements Quint as shown in the class diagram below. The meaning of the various arrows is covered in
Lecture 06 on Thursday, but you may ignore them or treat them as “associated in some way” for now.
Note: The Puzzle.compareGuess method and WordList class are supplied for your optional use at
cse1325-prof/P03/baseline/Puzzle.java, although you are free to write your own.
Puzzle
Quint
+main(args : String[])
-solution: Word
-solved: boolean
+Puzzle solution : String)
nareGuess(guess: String): String
boolean
WordList
-words: Stringit
+getWord) String
Word
letters: char(5)
+Wordſword: String)
+charAtposition: int): char
+setCharAtic : char, position : int)
+toStringi): String
QUINT
=========
Guess a 5-letter word
guess RAISE
…SE SALVE
S.LVE SOLVE
SOLVE
Guessed in 3 tries
Include a working build.xml file so that the ant command will build your code (this was provided to you in
lecture). Add, commit, and push all files to your private cse1325 GitHub repository.
Hints
Word
The Word class represents a 5-letter word that can be easily modified. The encapsulated data is a 5-element
char array named letters. A new Word object is constructed by supplying the 5-letter word to the constructor.
.charAt returns the character at the position parameter, which must be between 0 and 4. If the word is
ARISE, then word.charAt(2) would return I.
.setCharAt changes the character at the position parameter to the c parameter. If the word is MIGHT, then
word.setCharAt(‘S’, O) would change it to SIGHT.
.toString() returns the 5-letter word currently represented by the letters array. Note that the String class
has constructor that accepts an array of chars, so new String(letters) is all you need for this.
Puzzle
The puzzle class encapsulates a private Word named solution as well as a solved boolean. The constructor
accepts a 5-letter word as a String, converts it to a char array, and stores it as the solution field. Field solved is
set to false.
is Solved() simply returns the solved field.
compareGuess(guess) compares the String parameter guess to the field solution, return a 5-character
string representing the derived clue. Quint sets a capital letter for Wordle’s green (correct position), a
lowercase letter for Wordle’s yellow (letter in the wrong position), and I’ for Wordle’s grey (an incorrect
letter)
You may write your own compareGuess method, although one is supplied to you at no deductions since it’s a
bit complicated. Note that you only get that one method – you’ll need to write the rest of the Puzzle class!
WordList
WordList has a single method, getWord(), that returns a 5-letter word.
You may use the supplied WordList, which selects from almost 500 words in an array.
You may ignore WordList entirely, and take the solution from the command line (args[0]) or via Scanner.
Or you may write your own WordList if you prefer.
Quint
Quint contains the user interface in the main method. This is a common design pattern: Separate the user
interface from the “business logic”, which would make moving Quint to a Swing interface or web app much
simpler
Keep it short. Obtain a 5-letter word to use as a solution, and use it as the parameter when you instance
Puzzle as puzzle.
Then loop until puzzle.is Solved(), obtaining a guess and printing the result of compare Guess(guess) in a nice,
easy-to-read tabular format.
Once solved, print the number of tries needed to solve the puzzle.

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order