Week 8

Lectures

Lecture 1

The lectures this week will introduce input and output. First we introduce streams.

Lecture 2

We then description output to the screen and input from the keyboard. We first describe how to ceate an object that can read and print. It also allows you to replace the streams that go to the Monitor and the Keybord with streams that go to strings. Replacing the monitor and keyboard with a string supports testing.

Lecture 3

The third segment of this week describes how to to I/O in an object oriented way. We want to give the responsibility for reading and writing to the objects, but responsibility for the streams to a single object.

Tutorial and Lab

Tutorial

Questions to help you test your knowledge of the lectures.

Lab

This week we conclude our exploration of Shapes. We will add exceptions to the constructors. The constructors will throw an exception when the shape is wrong rather than sending back a special shape.

Shapes Backlog

One last time for the Shapes Backlog.