In this assignment,you are provided with a text file consisting of all 279,496 wordspublished in the 2019 version of the Collins Scrabble Worddictionary.
Given the letters ofseven randomized Scrabble tiles, you must determine the set ofscores that a player could possibly obtain by placing these tiles.We will be assuming three traits that differ slightly from thetraditional game of Scrabble:
As an example, assume that your sevenrandomized tiles read:
{‘A’, ‘C’, ‘A’, ‘A’, ‘B’, ‘A’, ‘H’}
The output should be1) a list of length n of words that can be created usingthese letters, and 2) a list of length n containing thescores (integers) for each of the words of length 1 ≤ m ≤7 that can be created using these letters (like ‘AA’, or
‘AAH’, which are bothwords within the Collins Scrabble Word dictionary, surprisingly).So two of the scores that will be in your score set for the abovetile set are 2 (A (1) + A (1) = 2), and6 (A (1) + A (1) + H (4) = 6).
Classes to Implement
For this assignment,you must implement two java classes: Tile and Scrabble. Follow theguidelines for each one below.
In these classes, youcan implement more private (helper) methods if you want to. You maynot, however implement more public methods. You may not addinstance variables other than the ones specified below nor changethe variable types or accessibility (i.e. making a variable publicwhen it should be private).
Penalties will be applied if youimplement additional instance variables or change the variabletypes of modifiers from what is described here.
Tile.java
This class representsa single Scrabble tile that will be used in the game. The classmust have the following private variables:
The class must have the followingpublic methods:
Scrabble.java
This class representsthe Scrabble game in which there are seven randomly selected tiles,and scoring is performed for each possible word (this will be thetougher class to implement).
The class must have the followingprivate variables:
The class must have the followingpublic methods:
“ABFEODL”)
CollinsScrabbleWords2019.txt
object to see if they are equal.
In this assignment, you are provided with a text file consisting of all 279,496 words published in the 2019 version of t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am