1.4.1 How to Represent Parameters in a Class Diagram

Whenever parameters are defined in code they need to be represented in a class diagram.


For example, the BeEaten method in the Food class has a parameter.

To represent this in a class diagram add the parameter inside the parenthesis using 'name: type' notation.