Cover by Allen B. Downey

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

O'Reilly logo

Appendix C. Lumpy

Throughout the book, I have used diagrams to represent the state of running programs.

In Variables, we used a state diagram to show the names and values of variables. In Stack Diagrams I introduced a stack diagram, which shows one frame for each function call. Each frame shows the parameters and local variables for the function or method. Stack diagrams for recursive functions appear in Stack Diagrams for Recursive Functions and More Recursion.

Lists Are Mutable shows what a list looks like in a state diagram, Dictionaries and Lists shows what a dictionary looks like, and Dictionaries and Tuples shows two ways to represent tuples.

Attributes introduces object diagrams, which show the state of an object’s attributes, and their attributes, and so on. Rectangles has object diagrams for Rectangles and their embedded Points. Time shows the state of a Time object. Class Attributes has a diagram that includes a class object and an instance, each with their own attributes.

Finally, Class Diagrams introduces class diagrams, which show the classes that make up a program and the relationships between them.

These diagrams are based on the Unified Modeling Language (UML), which is a standardized graphical language used by software engineers to communicate about program design, especially for object-oriented programs.

UML is a rich language with many kinds of diagrams that represent many kinds of relationship between objects and classes. What I presented in this book is a small subset ...

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