Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++, plz help For more info and files: http://voyager.deanza.edu/~bentley/cis22b/ass4.html The purpose of this assignment is to give you practice using dynamic memory allocation, c-string

In C++, plz help

For more info and files: http://voyager.deanza.edu/~bentley/cis22b/ass4.html

The purpose of this assignment is to give you practice using dynamic memory allocation, c-string functions, sorting, and searching.

Program Steps

Read adictionaryword file into anarray of c-strings. You will need to dynamically allocate memory for each word in thedictionary. The word file contains 23, 907 w

Sort thedictionary.

Reading in atest file, one line at a time. Parse the line to get each individual word in the line. Search thedictionaryword list (the array of c-strings) for eachwordin the line. If thewordis not found, print a message. The search should be performed as abinary search.

Program Requirements

Use these files for your dictionary and the final spell check test.

Use an array of char pointers store your word file.Allocate memory dynamically to store each word in a char array.Store the dictionary words in lower case.

Use a temporary char array to hold each line in the test file. "Parse" each line into individual words for spell checking. Note, you maynotuse the stringstream classes for this assignment.

Spell checking must ignore case. For example, "Hello" is the same as "hello".

Program Output

Your output should looks quite similar to this:

Misspelled word, struggled on line 10

Misspelled word, consecrated on line 11

Misspelled word, unfinished on line 13

Misspelled word, nobly on line 14

Misspelled word, advanced on line 14

...

  • Follow the program steps.Write only one part of the program at a time.Test each part before you proceed to the next step.Do not continue if one part has a problem.Ask for help with a step, if you can't get it to work.Remember to allow plenty of time for this assignment.
  • Use a smalldictionaryand a smalltest fileinitially as you are developing your code.
  • For your dictionary sort, you can "swap pointers" since you are working with an array of pointers.
  • Use strtok() for the parsing of each line.
  • Xcode users: There is a at the end of each line in thetest file. You can suppress it by adding " " as a delimiter for strtok().
  • Don't code the search for the 's and s endings until you get the rest of the search working.

The purpose of this assignment is to give you practice using dynamic memory allocation, c-string functions, sorting, and searching.You will write a spell checking program and test it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

List five things a leader should delegate.

Answered: 1 week ago

Question

What does the elimination process accomplish?

Answered: 1 week ago