CS 3304 Fall 2001 Homework Assignment 13

25 Points
Due: 12/12/01 at the start of class

Complete each of the following problems:

  1. Problem 9 in the Chapter 11 Problem Set (p. 455 of 5E text, in 4E: Chapter 10 p. 433)

  2. Problem 9 in the Chapter 13 Problem Set (p. 556 of 5E text, in 4E: Chapter 12 p. 530)

  3. Problem 15 in the Chapter 14 Problem Set (pp. 588-589 of 5E text, in 4E: Chapter 13 pp. 564-565). Assume that Smallis an inner class declared inside Big.

  4. Consider three different methods of dealing with error conditions in a C++ programs, as described in Chapter 14:

    • Using C++ exceptions.

    • Having every operation return a status code indicating success or the kind of failure that occurred (like HRESULT in the Windows API).

    • Passing an error-handling procedure as an additional parameter to each operation that can detect errors.

    Compare the advantages and disadvantages of these three alternatives. summarize your answer in a table comparing the three methods.

copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Last modified: December 3, 2001, 10:52:13 EST, by Stephen H. Edwards <edwards@cs.vt.edu>