O'Reilly logo

Practical UML Statecharts in C/C++, 2nd Edition by CRC Press

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Getting Started with UML State Machines and Event-Driven Programming

It is common sense to take a method and try it. If it fails, admit it frankly and try another. But above all, try something.

—Franklin D. Roosevelt

This chapter presents an example project implemented entirely with UML state machines and the event-driven paradigm. The example application is an interactive “Fly ‘n’ Shoot”-type game, which I decided to include early in the book so that you can start playing (literally) with the code as soon as possible. My aim in this chapter is to show the essential elements of the method in a real, nontrivial program, but without getting bogged down in details, rules, and exceptions. At this point, I am not trying to be complete or even ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required