Question: Write a program that: . . Opens a file. Prompts a user with a menu of choices. User makes a choice. . If one is

Write a program that: . . Opens a file. Prompts a

Write a program that: . . Opens a file. Prompts a user with a menu of choices. User makes a choice. . If one is chosen - the program counts the number of words in the novel. If two is chosen - the program prompts for a word to search for. It returns the number of instances of that word. o if three is chosen - the program returns a secret message that is embedded in the file delimited by @s. if four is chosen, close the output file and program exits. The menu will continue to display as long as four is not entered. Define a function called display_menu) displays a menu o returns the option chosen. Define a function called get_word_count() o resets handle_input reads every record in the file counts every word in the record adds count to a total count o returns the total count Define a function called get_specific_count() o resets handle_input reads every record in the file looks to match the word and counts the matches Define a function called find_message() resets handle_input finds a message embedded between 2 @s

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 General Management Questions!