CSci 581: Obj.-Oriented Design & Programming
Spring Semester 1999
Lecture Notes


A Second Look at Classes

This Web document was based on a set of "slides" created by the instructor for use in the Fall 1997 offering of the object-oriented design and programming course. That set was, in turn, based on a set of slides created by Timothy Budd to supplement chapter 20 of his textbook An Introduction to Object-Oriented Programming, Second Edition (Addison-Wesley, 1997).


What is a Class?


Classes as Types

What is a type?

application programmer's view:
set of values with common attributes and operations

object-oriented view:
behavior specifications

compiler view:
set of syntactic constraints on expressions (uses)

semantics/verification view:
set of invariants that instances of the type must satisfy

systems programming view:
protective mechanism wrapped around the bits

implementation view:
description of how the bits are stored in memory


Implications of Classes for Types

The is-a relation produces some subtle issues


Classes as Objects

If a class is an object it must have responsibilities.

What are these responsibilities?

















Classes as Objects in Java


Class Data

Often it is useful to have a single data area shared by all instances of a class.


UP to CSCI 581 Lecture Notes root document?


Copyright © 1999, H. Conrad Cunningham
Last modified: Wed Apr 21 15:12:06 CDT