1. Answer each of the following questions about the application:
a) In the original application, what were the different ways that NumberFormatException and IOException are handled?
The former use the method of calling a function to prompt the user and the later use the method of throwing an exception
b) Find all Java Collection objects used in this application. What are the roles of each object?
List: as the parent class of ArrayList,use List to receives the return value of ArrayList
ArrayList:As a specific collection to store Map.Entry<String, Counter> items
2. Describe what you learned doing this lab. Explain what was difficult and what was easy.
I learned how to use File I/O, exceptions, and Java Collections.
I think it's easy to read from a file, write to file and handle exceptions .But it a little difficult for me to get the hang of the collection,generics and iterator .