Instances and Object Diagrams Reporter: 陳雅萍
Abstractions and Instances Abstraction: the ideal essence of a thing Instance: a concrete manifestation of an abstraction –a set of operations may be applied and may have a state that stores the effects of the operation –not stands alone, always tied to an abstraction
Objects –is synonymous to instance –something that takes up space in the real or conceptual world –it is possible to change during the abstraction of that object –lives within the context of an operation, a component, or a node
Named, Anonymous, Multiple, and Orphan Instances
Object State
Standard Elements Stereotypes –instanceOf –instantiate –become –copy –transient
Modeling Concrete Instance
Modeling Prototypical Instances
Object Diagrams –model the instances of things contained in class diagram –a diagram that shows a set of objects and their relationship at a point of time –covers a set of instances of the things found in a class diagram –expresses the static part of an interaction
An Object Diagram
Contents Particular contents –Objects –Links Common contents –name, notes, package and subsystem
Common uses –model the static design view or static process view of a system –model static data structure –visualize, specify, construct, and document the existence of certain instances in the system, together with their relationships to one another
Modeling Object Structures
Object Diagram Properties –no single object diagram need capture everything about a system’s design or process view –reflect some of the concrete or prototypical objects that live in the running system