CSC 148 H1, Winter 2013

Lab 3 (Jan. 29/30)

This document contains the instructions for lab number 3 in CSC 148 H1. To earn your lab mark, you must actively participate in the lab.
We mark you in order to ensure a serious attempt at learning, NOT to make careful critical judgments on the results of your work.

General rules

We will use the same general rules as for the first lab (including pair programming). See the instructions at the beginning of Lab 1 to refresh your memory.

Overview

In this lab, you will write classes representing various kinds of vehicles. The goal is to make you explore and understand inheritance. You will also write test cases using the unittest framework, to test your vehicle classes. The goal is to ensure you understand how to use unittest.


Using inheritance

Getting started

(Student s1 drives and student s2 navigates.)

Show your work to your TA and switch roles.

Adding one more

(Student s2 drives and student s1 navigates.)

Show your work to your TA but don't switch roles.


Using unittest

Testing Motorized

(Student s2 drives and student s1 navigates.)

Show your work to your TA and switch roles.

Testing your other classes

(Student s1 drives and student s2 navigates.)

Show your work to your TA and switch roles.


Taking it further

(Student s2 drives and student s1 navigates.)