Design and implement (Code: c88)

New
Design and implement
zoom Zoom image

 

Read the case given below and answer the questions given at the end.

 

CASE STUDY – 2

Why do we type so many words with incorrect spelling? In some cases, it is because we simply do not know the correct spelling, so we make a "best guest." In some case, it is because we transpose two letters (e.g., "defualt" instead of "default"). Sometimes we double-type a letter accidentally (e.g., "hanndy" instead of "handy"). Sometimes we type a nearby key instead of the one we intended (e.g., "biryhday" instead of "birthday"). And so on.

Design and implement a spell-checker applet in Java. Your program should maintain an array wordList of strings. Enable the user to enter these strings. Once you have these capabilities, you can obtain the words for the spell checker from a computerized dictionary stored in a file.

Your program should ask a user to enter a word. The program should then look up that word in the wordList array. If the word is present in the array, your program should print 'Word is spelled correctly."

If the word is not present in the array, your program should print 'word is not spelled correctly." Then your program should try to locate other words in wordList that might be the word the user intended to type. For example, you can try all possible single transpositions of adjacent letters to discover that the word "default" is a direct match to a word in wordList Of course, this implies that your program will check all other single transpositions such as "edfault," "dfeault," "default," "deafult," and "defualt." When. you find a new word that matches one in wordList, print that word in a message such as, 'Did you mean "default?". "

2. Implement other tests such as replacing each double letter with a single letter and any other test you can develop to improve
the value of your spell checker.

Old price: 800.00 Rs
Price: 500.00 Rs
Delivery time: Email attachment
Weight: 0.0001 Kg
Quantity: