This is a simple class diagram example that shows the use of constraints.
Class or Package constraints may apply to one or more elements. There are no prescribed language and OCL is often used in the UML 2.0 specification. We can also use natural language instead.