Chapter 3. Structuring Your Classes with UML

In This Chapter

  • Drawing classes in UML

  • Drawing inheritance and other relationships

  • Building components with UML

  • Deploying the software

When you use the Unified Modeling Language (UML) to design software, your diagrams have two aspects. One is static, and the other is dynamic. The static diagrams represent the things that do not change while your program is running. For example, a class does not change while the program is running. When you write the code, you write the class name, member variables, and member functions, and you notate what is private, protected, and public. After you compile the program, this information does not change; it remains static. This is in contrast to the information you represent in the dynamic diagrams, where the information can change. Dynamic diagrams include things like object creation and deletion as well as object collaborations (objects working together, or collaborating, conspiring, plotting, and scheming like good little classes).

In this chapter, we discuss the different types of static diagrams. These are

  • Class diagram: A class diagram represents the different classes in your program.

  • Component diagram: A component diagram represents the major parts, or components, of your program.

  • Deployment diagram: A deployment diagram represents the different computers and hardware that your program will ultimately run on.

Note

In this chapter, we talk about the UML diagrams. And although you'll rarely hear us say this, ...

Get C++ All-In-One For Dummies®, 2nd 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.