previous |
start |
next
Scenario
- PurseTest.main calls
Purse.readFile
- Purse.readFile calls Purse.read
- Purse.read calls Coin.read
- Coin.read throws an EOFException
- Coin.read has no handler for the exception and
terminates immediately.
- Purse.read has no handler for the exception and
terminates immediately
- Purse.readFile has no handler for the exception and
terminates immediately after executing the finally clause and
closing the file.
- PurseTest.main has a handler for an
IOException , a superclass of EOFException. That
handler prints a message to the user. Afterwards, the user is given
another chance to enter a file name. Note that the statement
printing the purse total has been skipped.
previous |
start |
next