2.1.1 How to Represent Object Parameters in a Class Diagram

Objects as parameters are represented just as primitive types. The only difference is that the type is now a custom type.



Say we have the code below:

The parameter food would be represented in a class diagram as shown below: