Moving Functions into Classes

The calculator you've constructed so far is not very different from an object-oriented C++ program. This lesson will document an object- oriented design of the calculator to show the differences.

The UML Diagram

The Unified Modeling Language (UML) is a standard way of drawing diagrams of object-oriented programs regardless of language. There are several types of UML diagrams, but you will be looking at only one of these: the class diagram.

A class diagram shows the classes that make up a program and their relationships (UML also calls these associations)—especially whether one class has member variables of another class. There is a single block for each class, and each block is divided into sections for the class ...

Get SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.