hw9 - CS 302 Homework 9 Due Wednesday July 27 Name 1 Given...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 302 Homework 9 - Due Wednesday, July 27 Name: 1. Given the specifications of Programming Assignment 5, list at least three classes you will write for this assignment. Also, identify each class as either an instantiable class or an main application class and provide a description of what each class stores and can do. 2. (a) Suppose that line A of the following method throws a FileNotFoundException. Modify the code to propogate this exception. public void readFile(String filename) { FileReader f = new FileReader(filename) // METHOD LINE A ... } (b) Suppose that line B of the following method throws an InputMismatchException. Modify the code to resolve this exception. public int getMenuChoice(String menu) { System.out.println("Enter menu choice: "); int choice = stdin.nextInt(); // METHOD LINE B } ...
View Full Document

This note was uploaded on 08/08/2008 for the course CS 302 taught by Professor Willbenton during the Spring '07 term at University of Wisconsin.

Ask a homework question - tutors are online