CSC 148 H1, Winter 2013

Lab 1 (Jan. 15/16)

This document contains the instructions for lab number 1 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.

You may be tempted to do the lab work before your actual lab. We really, really don't want you to do this, for a number of good pedagogical reasons:

Here are the activities for this lab:

  1. Preliminaries
    1. Icebreaker
    2. Pair Programming Model
    3. Setting up email forwarding
  2. Programming
    1. Getting started with Wing
    2. Designing a class
    3. Implementing a class

All of these activities should be very fast to complete, except for the last two: you should spend most of your time (at least 3/4 of it) on those last two activities.


Preliminaries

Icebreaker

You will be spending lots of hours with your TA and fellow classmates, so you will start by getting to know them. Your TA will get you going on this.

Pair Programming Model

In every lab, you will be working in the pair programming model. Obviously, two programmers are involved, and we call these two people the driver and the navigator. Here are the definitions of the two roles:

And here is the most important rule for every lab:

Throughout the lab, you will be switching back and forth between the driver and navigator roles. The instructions will tell you when to do this.

Setting up email forwarding

Repeat the following set of instructions twice, once for yourself and once for your partner.

  1. Enter your user ID and password. Wait while the computer starts up.

  2. We (the computer science department) will sometimes email information to everyone's CDF account. Unless this will be your primary email account, you must set up "email forwarding". You can find instructions for email forwarding at the following URL:

        http://www.cdf.utoronto.ca/faq.html#MAIL4
    

    Do this now. Later, at home, check to see that you set up forwarding properly, by sending mail to yourself and seeing if it appears at the right destination account. Too often, we send messages such as assignment marks to students, only to find their addresses are wrong — and we can't fix them. Please check your forwarding!

If you see someone having trouble, please help them. Some people in the class are new to the computer labs — make them feel welcome!


Programming

To begin, decide who will start out as driver and who will start out as navigator.

These restrictions are supposed to make it easy to split up the work between the two roles. But they are not meant to be overly restrictive: you are supposed to discuss what you are doing with your partner throughout the lab!

During the course of the lab, show your work to your TA frequently, and feel free to ask questions — that's why they're here! Don't hesitate to also ask other students if you get stuck, and please be generous in helping others.

Getting started with Wing

Remember, these instructions are meant for the driver...

Before moving on to the next section, show your work to your TA and switch driver and navigator roles.

Designing a class

You've remembered to switch driver and navigator roles, right?...
OK, once again, these instructions are for the driver.

Before moving on to the next section, show your work to your TA and switch driver and navigator roles.

Implementing a class, part 1

Once again, these instructions are for the driver.

Before moving on to the next section, show your work to your TA and switch driver and navigator roles.

Implementing a class, part 2

I shouldn't have to remind you at this point, but just in case... These instructions are for the driver! :)

Show your work to your TA one last time. Congratulations: you're done with the first lab!


A final reminder, because it's important: show your work to your TA frequently, and feel free to ask questions — that's why they're here! Don't hesitate to also ask other students if you get stuck, and please be generous in helping others.