Question: use c++ please Program #2: Write a program named Exam2Program2 that uses an enumeration type to categorize words. For simplicity, assume that the words will

use c++ please
Program #2: Write a program named Exam2Program2 that uses an enumeration type to categorize words. For simplicity, assume that the words will contain only lower-case letters. Your program should define an enumeration type, wordType, that has the values LONG, KONG RHYME STRANGE, and NORMAL. It should also have a function that takes as its parameter a string and returns a value of type wordType, with this return value being determined as follows If the string is more than 9 letters long (for example, disestablishment), then the function returns the value LONG Otherwise, if the string ends with "ong" (for example, wrong or belong), then the function returns the value KONG RHYME Otherwise, if the string contains at least one "q" and the first "q" in the word is u" (for example, qabala or faqir), then the function returns the value STRANGE Otherwise, the function returns the value NORMAL ed by a Your program's main function should read a single word from the disk file named word.txt, which you will create using Microsoft Notepad. The main function should then call the function described above, and then, based on the return value from that function, display one of the following four messages (In each message, replace the first blank with the word contained in the file.) has letters. I don't like such long word .Your word (But the second blank here should be replaced by the correct number.) eYour word, Your word, Your word, , rhymes with Kong is a strange word! is unremarkable are shown below. Your outputs should look exactly like this (spelling, punctuation number format, and so on) Sample Run #1-Suppose the file contains quadcopter. Then the output looks like this Your word, quadcopter, has 10 letters. I don't like such 1ong words Sample Run #2-Suppose the file contains quong. Then the output looks like this Your word, quong, rhymes with Kong Sample Run #3-Suppose the file contains mbaqangas . Then the output looks like this Your word, mbaqangas, is a strange word! Sample Run #4-Suppose the file contains songbooks. Then the output looks like this Your word, songbooks, is unremarkable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
