Question: Could you fill out this C# program? At a minimum, your class EnglishDictionary must define the following: public class EnglishDictionary { public EnglishDictionary(string fileName) {

Could you fill out this C# program?

At a minimum, your class EnglishDictionary must define the following:

public class EnglishDictionary {

public EnglishDictionary(string fileName) {

// This constructor will initiate the loading of all words located

// in the given dictionary. The constructor must return very quickly,

// perhaps before the words have been completely loaded. Tasks will be

// needed to do this. } public bool IsLegal(string word) {

// This method will return true only if the word appears in the

// dictionary. This method will need to wait, if it is called

// before the words have been completely loaded. }

public ISet ScrabbleWords(string tiles, int minLength) {

// This method will return the set of all words that can be formed using a

// collection of Scrabble tiles, that has a minimum length. Each tile can

// be used at most once but there may be more than one tile for a given letter.

// Each letter can only be used once. For example, consider the tiles: HERATH

// Here are some of the words of at least length 4 that can legally be formed:

// HEAT, EARTH, HEART, HEARTH, ...

// Some English words cannot be formed using the tiles: REATA, ARHAT

// Like the previous method, this method may need to wait too.

}

public bool Anagrams(string A, string B) {

// This method will return true if the two passed words are anagrams of

// one another. Ignore spaces. Here are some examples of how this method

// should work:

// Anagrams("income tax", "toxic name") true

// Anagrams("abcc", "cbca") true

// Anagrams("abcc", "bca") false

} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!