SWE 619 Assignments 12 and 13
Spring 2013


Goal: Tools: Contracts, Security, Agile, Testing

You have a choice of possible assignments. Choose one for assignment 12 and another (different one) for assignment 13.

In each case, the deliverable is a story. Write a brief report, and include enough evidence (output, screen shots, etc.) that the GTA can figure out that you actually completed the assignment.

  1. Bring up the C# contracts mechanism in VisualStudio. Translate one of Liskov's examples to C# and implement the contracts with the Code Contracts mechanism.

  2. For most of the semester, we have focused on design considerations for constructing software that does something we want it to do. For this last assignment, I would like students to appreciate just how vulnerable software is to malicious parties intent on attacking their software. Students who find this assignment amusing might wish to take SWE 781: Secure Software Design and Programming.

    There are two attacks documented in Bloch's Item 76: Write readObject() methods defensively. One is called BogusPeriod, and the other is called MutablePeriod. Implement either (your choice) of these attacks (basically involves typing in code from Bloch) and verify that the attack takes place.

  3. Download the Pex tool discussed in class and use it to generate some test data in a .NET environment.

  4. Do one of the following, depending on your current Agile expertise:

  5. Convert an existing JUnit test set to use either JUnit Parameterized (where, confusingly, methods don't have parameters) or JUnit Theories, (where methods do have parameters). Or do both. If you wish to construct JUnit from scratch for this, that's fine too.