Open the file while there are words in the file read in a word If the word is in the array, increment the count else if there is space in the array add the word to the array Close the file Print the array sorted alphabetically Print the array sorted numerically