Chapter 2. OCL By Example

The sample system specification in this chapter provides a short and informal introduction to OCL. A complete and rigorous description of OCL can be found in Part 2. After reading this chapter, you will be able to add simple OCL expressions to your own UML models.

The “Royal and Loyal” System Example

As an example, we have modeled a computer system for a fictional company called Royal and Loyal (R&L). R&L handles loyalty programs for companies that offer their customers various kinds of bonuses. Often, the extras take the form of bonus points or air miles, but other bonuses are possible as well: reduced rates, a larger rental car for the same price as a standard rental car, extra or better service on an airline, and so ...

Get Object Constraint Language, The: Getting Your Models Ready for MDA, 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.