Write a C++ program called Dictionary with the following requirements:
1. Create a text file named dictionary.txt. This dictionary text file will contain the words and their associated definitions. You may store the words and definitions in this text file however you choose. Some examples may be "word-definition" or "word\ndefinition".
2. Declare and define a dictionary class. Use an STL map to store your words and definitions. Use an iterator to print the contents of the STL map. Include any additional functions you need to achieve the requirements below.
3. Main function: Create an instance of the dictionary class and pass it the dictionary.txt file. Extract the words and definitions from dictionary.txt and store them in an STL map within your dictionary class. Create a "menu" that provides the user with these options:
1 - Print dictionary
2 - Find word definition
3 - Enter new word and definition
4 - Exit
If the user inputs '1', all the words and definitions are printed out in the format "word - definition for word". The program then returns to the "menu".
If the user inputs '2', they are prompted to enter a word to find in the dictionary. Wait for user input. If the word exists, print out the definition and return to the menu. If the word does not exist, print out "the word doesn't exist" and return to the menu.
If the user inputs '3', they are prompted to enter a word. Provide text telling the user to enter a new word. Wait for user input. If the word already exists in the dictionary, tell the user the word exists and tell them to enter a new word. Wait for user input. If the word is new, tell them to enter a definition. Provide text telling the user to enter a definition. Wait for user input. After they have entered the definition, tell them their new word and definition has been added to the dictionary. The program will now return to the "menu".
If the user inputs '4' in the menu, the program will terminate.
4. New words and definitions added by the user must be added to the STL map and saved in the dictionary.txt file.