1997 | OriginalPaper | Chapter
Object Orientation and State Systems
Author : Bernard P. Zeigler
Published in: Objects and Systems
Publisher: Springer New York
Included in: Professional Book Archive
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
This chapter uses simple state machines to introduce the basic concepts of object orientation. You have run across state-system concepts in earlier courses, such as discrete math. One immediate advantage of using such concepts is that they enable us to describe the functioning of an object in a form independent of any particular software implementation. Using state diagrams, we can specify what functionality we want to obtain and then investigate different ways to achieve it. One of the simplest, yet nontrivial, examples of a finite state machine is the binary counter. First we implement this machine in C using a nonobject-oriented implementation. Then we will show how this machine can be implemented in C++. This will provide the basis for comparing the two kinds of approaches to programming and thereby demonstrate the advantages of object orientation.