Operations
An Operation allows you to specify the function of a Class. Defining an Operation enables you to request a Class to perform that function.
If you have a Class called policy for example, you could create an Operation called createClaim to create a claim against this policy.
You can specify arguments and argument types for Operations. Arguments often add extra data that the operation needs. For example, the createClaim operation could specify the Doctor’s visit notes as a parameter.
An Operation can also return a value after it has finished. You can show the value it returns and the value’s type. For example, the createClaim operation could return the Claim once it has completed.
Each Class can have a number of Operations. Operations that are defined for a Class are displayed in the Operations Compartment of the Class, below a line that separates them from the attributes, as shown below.
The example shows the createClaim operation that has a parameter of VisitNotes and whose return value is the Claim.