🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators greater than
Created by Charles on 2025-11-18 · Last edited by Colline.ssali on 2025-12-30.

Symbol (>)

The > operator is a comparison operator used to determine whether the value on the left-hand side is strictly greater than the value on the right-hand side. It evaluates to a Boolean result (true or false) and is commonly used in OCL constraints and validation rules.

Example:

Assume the Department class has an attribute called EmployeeCount.

self.EmployeeCount > 0

The department must have more than zero employees. If EmployeeCount is greater than 0, the expression returns true, else it returns false.