Sequence diagrams can be used to describe the USES of a class or interactinggroup of classes, thus describing the protocols required for interaction.
序列图可用于描述类或一组相互作用的类的使用,因而描述了交互所需的协议。
2
When you're writing code, think about the contract — the particular bit you're writing will expose to its client, whether it's a method, a class, or a group of interacting classes.