(a) The method for the setting the capacity should throw an exception.
There is no normal case where the program should set the capacity to a
negative value, so this is definitely an unexpected error condition.

(b) The method reading the configuration file should throw an
exception.  The object should not expect syntax errors in its
configuration file.

(c) This method might return -1 (an impossible real index value) to
indicate that the string is not in the array.  The programmer may
expect that the string might not be in the array.

(d) The "open" method could throw an exception, or it could return a
null value in place of the expected object representing the file,
because it is possible that the program will want to handle the
situation immediately anyway, by creating the file, for instance.

(e) The method that detects the security violation should throw an
exception.  The code trying to open the file should not be cluttered
with checks for security failures, and it is likely that dealing with
such a restriction would be best handled by a higher-lever method of
the program.

(f) The connect method could throw an exception, or it could return a
special value indicating that the host could not be found.

(g) The method that detects the failed network should throw an
exception.  Network failure is not a normal, expected condition in the
processing of the conversation and so it should be dealt with in an
exception handler.
