Home CPSC 240

Writing Assignment: Handling Errors

 

Due: October 8

 

Objective

To get experience writing about computer science, and look at ways of handling errors.


 

Task

For this writing assignment, you will do the following:

  1. Find a source that describes how to use "assertions" in Java. Citing this source, summarize what they do and how they can be used. Come up with your own example that demonstrates to the reader how they work.
  2. Read pages 120–128 of "The Pragmatic Programmer" by Andrew Hunt and David Thomas. A PDF of these pages is in the Canvas "Files" tab.
  3. Summarize this reading in about one page. In your summary, be sure to highlight the most important points that the authors make.
  4. The reading talks about two ways of dealing with error situations: exceptions and assertions. Write about when you would use one vs. the other. Give a concrete example of a good example of using each.
  5. Write about the trickiest bug that you have dealt with before. Here we mean something that goes wrong with a program as it's running — not just a compiler error. Could this bug have been avoided, or dealt with more easily by using assertions or exceptions?
  6. Write a short introduction and conclusion to this paper.

 

General Requirements

Your paper should:


 

Submitting

To submit your program, email the paper in PDF format to ifinlay@umw.edu.

Copyright © 2019 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.