COMP 304B Object-Oriented Software Design -- Assignment 1

COMP 304B Object-Oriented Software Design - Assignment 1

Practical information

Goals

This assignment will make you familiar with unit testing, and with object-oriented programming in Python.

Your assignment solution should clearly present:

  1. An explicit list of requirements, with their type. 15%
  2. The tests corresponding to these requirements. 40%
  3. An implementation in Python. 40%
  4. The results of the tests on your implementation. 5%

Upload all source and result files to WebCT and provide links to all of them from your index.html file.

Requirements

The code for which you write unit tests and which you implement could be used to build a fully functional PlotWindow.
The following figure shows what a PlotWindow might look like.
Note that in this assignment, you will ONLY design and implement (a part of the) the non-visual part of the PlotWindow !
At the heart of the PlotWindow will be a number of classes:

Detailed Requirements (in classes' comments)

Unit Testing

You must come up with a reasonable (don't go overboard !) list of tests (mention their type!) to check the correct implementation of the above classes/methods. Note that you will have to define the requirements yourself based on the comment given in the classes above.

Note that you will need to do type checking of method arguments as Python does not do static type checking.

These test should be implemented in a file testsuite.py using the PyUnit testing framework.

References


Hans Vangheluwe Winter Term 2008.