SUNY Geneseo Department of Computer Science


Introduction to Design

{Date}

CSci 141, Fall 2004
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture


Questions?

Lab deliberately graduated series of exercises

Reading Summary

Sections 2.1 - 2.3, 2.5

Abstraction (concentrating on some essential features while ignoring inessential ones) as a tool for thinking about algorithms

Pre- and postconditions provide an abstract interface to an algorithm: they specify what the algorithm needs in order to work (preconditions) and what it produces in return (postconditions)

Objects can also abstract values/data, as well as actions.

Some comments on this reading summary

Mini-Chess

An example of object oriented ideas

Chess, but on a small board and with only 4 pieces per side:

[A 4-by-4 Chess Board after a Game]

Try a game

What does this have to do with object oriented programming?

Cell Phones and Abstraction

Two descriptions of how to place a call:

  1. Push buttons for the number to call, then push another button to place it
  2. Push buttons for the number to call, which generates "interrupts" to the computer in the phone, which stores the number somewhere in its memory; when the "interrupt" for the "dial" button arrives the computer causes the radio transmitter to emit radio waves that vary subtly in their timing....

The first of these is much more useful to someone wanting to make a call, because it is more abstract -- it hides or filters out many details of how a call is "really" placed in order to emphasize just what a person using the phone needs to know.

Next

Introduction to Theory

Read Sections 3.1, 3.2, 3.6


Next Lecture