Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do you write a program in java that is a spell checking program which uses a

ID: 657170 • Letter: H

Question

How do you write a program in java that is a spell checking program which uses a dictionary of words (input by the user as a string) to find misspelled words in a second string, the test string. The program should prompt the user for the input string and the dictionary string. A valid dictionary string contains an alphabetized list of words.
Functional requirements:
1. For each word in the input string, the program should search the dictionary string for the given word. If the word is not in the dictionary, your program should print the message "Unknown word <word> found" to standard output.
2. After traversing the entire input string, the program should print a message describing the total number of misspelled words in the string.
3. A dictionary string may contain words in uppercase, lowercase, or a mixture of both. The test string may also contain upper and lower case letters. The program should recognize words regardless of case. So if "dog" is in the dictionary string, the word "dOG" should be recgnized as a valid word.
4. Within a string, a word is a white-space delimited string of characters. So the last word in "Hello world!" is "world!".

Explanation / Answer

public class Dictionary {

    public static void main(String[] args) {

int check,count=0,chkcount=0,i=0;

String[] dictionary=new String[100];

String input_string;

String[] words= new String[100];

Scanner sc=new Scanner(System.in);

System.out.println(

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote