I need to write a program for my c++ class. It is due at 12 tonight and I really have no idea how to do it.
I don't have any fg at the moment but if someone is willing to do the program for me I can get it quickly I promise. I will pay 1000 fg or more to whomever can do this for me
Description:
The purpose of this program is for you to (1) continue practicing with the use of arrays to manage program data, (2) learn how to declare and properly manage a dynamic array, and (3) to expose you to the use of structs to manage data in "packages."
For this project, you will create an application that does the following:
1. prompt your user for an input file name, and read in this filename
2. open the file, read in the first line, which will be an int, and use this value to size a dynamic array; this value also represents the number of words in the "dictionary" that appears in the file, following immediately after the int
3. read in all of the dictionary words from the file and set the count of each dictionary word to 0; define and use a struct to "package" the string (the word itself) and int (the number of occurrences of that word)
4. display the dictionary list, showing both the words and all counters set to 0
5. immediately after the dictionary words list will be the "data" part of the file that is to be processed; processing of this "data" portion will consist of reading in each line, then reading each word of the line and adding to the count of the dictionary words whenever these words are encountered in the file
6. after reading all lines in the file, close the file
7. display a report, showing the dictionary words and their counts
8. repeat if the user chooses to do so
NOTES
• the dictionary will be case sensitive; "The", for example, will be treated as different from "the"
• the appearance of the word in the dictionary list in the file does not count as an appearance of that word in the "data" part of the file
• there will be no punctuation in the "data" part of the input file
Objectives:
• define and use a struct to manage data
• declare, initialize, use, and delete a dynamic array
• process a text file for program input
• continue practice on the definition and use of functions to organize code
Requirements:
• your program source code must be documented correctly (see the starter.cpp example) [5 points]
• your program source code must be neatly and consistently formatted (see the starter.cpp example) [5 points]
• your program must compile and run without errors [5 points]
• your program cannot have any global variables (with the exception of CinReader reader) [5 points]
• your program must continue running until the user chooses to quit [5 points]
• your program must include and correctly use a dynamic array [10 points]
• your program must include and correctly use a struct defined to address the requirement as described above [10 points]
• your program must prompt for a filename and open and process that file [10 points]
• your program must display the dictionary list, showing all counters set to zero before the "data" portion of the file has been processed [10 points]
• your program must display the final tally, to include each word of the dictionary and a count of the number of times that word appeared in the "data" part of the file [10 points]
Sample file:
myfile.txt
----------------------------------------
3
dog cat eat
Once there was a dog
that liked to eat a cat
instead the cat ate the dog