An operation is a string item listed in the operation compartment of a classifier. The operations define the behavior of the classifier and the work that the classifier can carry out. An operation can take a list of parameters and return a type. Its visibility can be restricted and other factors, such as concurrency, can be specified using the property-string.
Explanation
Operations describe the work that a classifier can carry out. They are important expressions of the behavior of a classifier and give the classifier along with the attributes its essential character. The syntax for the operations is given below:
visibility name ( parameter-list ) : return-type-expression { property-string }
An attribute is related to an operation because they have many similarities in the syntax of their expression. They are distinguished from each other graphically by the compartment in which they are listed.