Question: C++. Please include screenshots and code to copy and paste. Thank you. Make sure to have prototypes We are not using strings in this assignment.

C++. Please include screenshots and code to copy and paste. Thank you.

Make sure to have prototypes We are not using strings in this assignment. This is an exercise in working with arrays of characters Make sure to pick variable names that are meaningful (k, r, a, b should have names to them) This assignment needs to use array of characters and write functions to break down the problem into small parts each with clear and distinct purposes. We want to learn how to use the subscript operator and loops (such as the for loop) to step through an array one element at a time.

The purpose of the program is to continue refining our programming skills in C++ and practice using arrays of characters, the subscript operator, the cstring library, and functions with arguments. Our goal is to create programs with a small functions where main delegates to a series of functions where the real work takes place.

Guidelines:

  1. No global variables (global constants are fine).
  2. Avoid using break within a loop (unless working with a switch statement).
  3. Never use a return in the middle of a loop!
  4. Write your own functions for processing the array of characters. This is not an exercise of calling pre-written functions to do the project.
    1. The only pre-written function you may use besides I/O is strlen from the cstring library
  5. Limit the length of your functions to no more than 30 statements of code (not including comments, blank lines, or variable definitions).

The idea with this assignment is to write your own functions to solve this problem.

Program Assignment:

I recently learned about the process that they use to add and remove words to the dictionary. When a new word starts being used frequently it can gain entry into the dictionary, but it must be used in a broad range of works and over a significant amount of time. To do this, they scan works all over the internet on a regular basis to monitor the frequency of words being used. If words stop being used on a regular basis, they may move them to an obsolete category.

We want to simulate this on a small scale. From an entire paragraph entered by the user, we want to find out if a particular word, of the users choice, can be found in that paragraph and at what frequency.

For this program, the input should consist of two items:

  1. The word that the user wants the check
    1. You may assume that a word is no longer than 25 characters
  2. The paragraph
    1. You may assume that a paragraph is no longer than 500 characters

Your job will be to step through the paragraph looking for a match of the word provided by the user, counting each match. The words should match regardless of capitalization or punctuation (i.e., COMPUTER, Computer, and computer! should all match to the word computer).

Once completed, let the user try another word with the same paragraph.

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!