Write a program that will take input from a file and will output the number of times that each of the following five strings occurs in the input: There are no trap states or illegal characters.
1. reverse
2. enter
3. event
4. seven
5. tent
The input to your program must come from a file. The file should be a command line argument. The input does not have to be sensible English text. Our program will not be case sensitive (uppercase characters should be treated as their lowercase equivalents)
Sample from a program with pancake, peek, cake, keep:
PancakeepeekeEPancakpepepeek kepepeekepeekancakee panpcakeepeekeepkeOccurrence counts: pancake count is 1 cake count is 3 keep count is 4 peek count is 5
Fourscoreandsevenpanpanpancakepanwwkwwp keepeekpancakeepancakeePcakeep keepancakecakEEPPEREPePE keerpan_cake_panncakekekeepeekeepeekeepeeek parkaI will run your program by using the commandline to give a text file, so do not have your program ask for a file name. (see NewFSM.java example)Occurrence counts: pancake count is 4 cake count is 8 keep count is 9 peek count is 3