Unified Modeling Language User Guide Section 3 Advanced









- Slides: 9

Unified Modeling Language User Guide Section 3 — Advanced Structural Modeling Chapter 11 — Interfaces, Types, and Roles

Overview • Interfaces, types, roles, and realization • Modeling the seams in a system • Making interfaces understandable and approachable Sung Kim CS 6359 Chapter 11 Slide 2

Terms/ syarat & Concepts • Interface: a collection of operations that are used to specify a service of a class or a component • Type: a stereotype of a class used to specify a domain of objects, together with the operations applicable to the object • Role: the behavior/ kelakuan of an entity participating in a particular context. Sung Kim CS 6359 Chapter 11 Slide 3

Interfaces ISpell IThesaurus interfaces wordsmith. dll IUnknown component Sung Kim CS 6359 Chapter 11 Slide 4

Interfaces • Name: simple names, path names • Operations: unlike classes, interfaces do not specify any structure (no attributes), nor do they specify any implementation (no methods, which provide the implementation of operations). • Relationships: like a class, an interface may participate in generalization, association, and dependency relationships. Sung Kim CS 6359 Chapter 11 Slide 5

Interface vs. Abstract Class • An abstract class may have attributes, but an interface may not. • Interfaces span model boundaries. The same interface may be realized by both a class (a logical abstraction) and a component (a physical abstraction that provides a manifestation of the class). Sung Kim CS 6359 Chapter 11 Slide 6

Modeling the Seams in a System • Group those that tend/ memelihara to be tightly coupled relative to other sets of classes and components. • Refine/ membersihkan your grouping by considering/ mempertimbangkan the impact of change • Package logically related sets of crossboundary operations and signals as interfaces Sung Kim CS 6359 Chapter 11 Slide 7

Hints and Tips • A well-structured interface: – Is simple yet complete. Providing/ asalkan all the operations necessary/pokok yet sufficient/cukup to specify a single service. – Is understandable, providing sufficient information. – Is approachable/mudah ditemui, providing information to guide the user to its key properties without being overwhelmed/ membanjiri by the details of a pile/ tumpukan of operations. Sung Kim CS 6359 Chapter 11 Slide 8

Summary • • Interfaces, types, & roles Interface vs. Abstract Class Modeling the Seams of a System Well-Structured Interface Sung Kim CS 6359 Chapter 11 Slide 9