Midterm Exam Review Questions
- What is the difference between extending a base class and implementing an interface? When is it appropriate and/or necessary to do either of these?
- What is an event handler? What role does it play in a program?
- Explain how to set up a listener to respond to events. What are some of the kinds of listeners?
- How do you use the Graphics class to draw in a panel?
- How do you use a model class to populate a JList with items?
- Explain how to set up and use a dialog box using the NetBeans GUI designer.
- How do you go about creating and using your own exception type? Why would you want to create a new exception type?
- Suppose you wanted to write some code to read a list of ints from a binary file on disk. To do this you would use the File, FileInputStream, and DataInputStream classes. What role does each of those three classes play?
- What is an ArrayList? How do you use it? How does an ArrayList differ from an array?
- What is an Iterator? How do you use it?
- Explain what the TreeMap class does and how to use it.