Programming with abstract data types

2/15/98


Click here to start


Table of Contents

Programming with abstract data types

What do we need?

Defining classes

The Token class

How will we implement it?

Representing the kind of token

Finishing the definition

Defining the member functions

Now comes the (first) hard part

Token constructor, part 1

What are the possibilities?

Our first task

Scanning white-space characters

Where are we now?

Dealing with what we scanned

Reading a word: strategy

Reading a word: code

A note on ungetc

The reduced code

The Line class

The Line constructor

The reset function

The canfit function

The append and print functions

Putting it all together

And finally, the main program...

Thoughts on the program

Dependencies

Mechanics

Author: Andrew Koenig

Email: ark@research.att.com

Home Page: http://www.research.att.com/info/ark