Unified Modeling Language User Guide Section 3 Advanced

  • Slides: 12
Download presentation
Unified Modeling Language User Guide Section 3 - Advanced Structural Modeling Chapter 13 –

Unified Modeling Language User Guide Section 3 - Advanced Structural Modeling Chapter 13 – Instances Chapter 14 – Object Diagrams

Overview • • • Instances and Objects Modeling Concrete Instances Modeling Prototypical Instances Modeling

Overview • • • Instances and Objects Modeling Concrete Instances Modeling Prototypical Instances Modeling Object Structures Forward and Reverse Engineering Sung Kim CS 6359 Chapter 12 Slide 2

Instances • The terms “instance” and “object” are largely synonymous; for most part, they

Instances • The terms “instance” and “object” are largely synonymous; for most part, they may be used interchangeably/ yg dpt dipertukarkan. • Use instances to model concrete or prototypical things that live in the real world. • Transient: specifies that an instance is created during execution of the enclosing interaction but is destroyed before completion of execution (a standard constraint that applied to objects). Sung Kim CS 6359 Chapter 12 Slide 3

Abstractions & Instances • Instances don’t stand alone: they are almost always tied to

Abstractions & Instances • Instances don’t stand alone: they are almost always tied to an abstraction. • Instances of: – Classes (objects) – Components, nodes, use cases, and associations • To indicate an instance, you underline its name. Sung Kim CS 6359 Chapter 12 Slide 4

Other Concepts anonymous instance named instance my. Customer : Multimedia : : Audio. Stream

Other Concepts anonymous instance named instance my. Customer : Multimedia : : Audio. Stream t : Transaction : key. Code agent : Orphan/yatim instance multiobject c : Phone [Waiting. For. Answer] instance with attribute values r : Frame. Render. Thread my. Customer active object instance with explicit state Sung Kim CS 6359 Chapter 12 id : SSN = “ 432 -89 -1738” active = True Slide 5

Modeling Concrete Instances (steps) • Identify the instances necessary/ kebutuhan and sufficient to model

Modeling Concrete Instances (steps) • Identify the instances necessary/ kebutuhan and sufficient to model the system. • Render these objects in the UML as instances; give meaningful names if possible or render it as an anonymous object. • Expose the stereotypes, tagged values, and attributes. • Show these instances and their relationships in an object diagram. Sung Kim CS 6359 Chapter 12 Slide 6

Modeling Prototypical Instances (steps) • Identify those prototypical instances necessary and sufficient to model

Modeling Prototypical Instances (steps) • Identify those prototypical instances necessary and sufficient to model the system. • Render these objects in the UML as instances; give meaningful names if possible or render it as an anonymous object. • Expose the properties of each instance. • Show these instances and their relationships in an interaction diagram or an activity diagram. Sung Kim CS 6359 Chapter 12 Slide 7

Object Diagrams • Object diagrams model the instances of things contained in class diagrams.

Object Diagrams • Object diagrams model the instances of things contained in class diagrams. • Shows a set of objects and their relationships at a point in time. • Used to model the static design view or static process view of a system. • Shows a snapshot of the system at a moment in time and rendering a set of objects, their state, and their relationships. Sung Kim CS 6359 Chapter 12 Slide 8

An Object Diagram c : Company d 1 : Department name = “Sales” object

An Object Diagram c : Company d 1 : Department name = “Sales” object d 2 : Department link d 3 : Department name = “R&D” attribute value name = “US Sales” anonymous object manager p : Person Sung Kim name = “Erin” employee. ID = 4362 title = “VP of Sales” : Contact. Infomation address = “ 1472 Miller St. ” CS 6359 Chapter 12 Slide 9

Modeling Object Structures (steps) • Identify the mechanism. • For each mechanism, identify classes,

Modeling Object Structures (steps) • Identify the mechanism. • For each mechanism, identify classes, interfaces, and other elements that participate in this collaboration; identify the relationships among these things. • Consider one scenario that walks through this mechanism. Freeze that scenario at a moment in time and render each object that participate in the mechanism. • Expose the state and attribute values of each object. • Expose the links among these objects Sung Kim CS 6359 Chapter 12 Slide 10

Forward & Reverse Engineering • Forward engineering an object diagram: possible but limited value.

Forward & Reverse Engineering • Forward engineering an object diagram: possible but limited value. • Reverse engineering an object diagram: very useful in debugging process. – Choose the target and walk through a scenario – Identify the set of objects that collaborate in that context. – Expose these object’s states attribute values and links among these objects. Sung Kim CS 6359 Chapter 12 Slide 11

Summary • • Instances Abstractions & Instances Modeling Concrete Instances Modeling Prototypical Instances Object

Summary • • Instances Abstractions & Instances Modeling Concrete Instances Modeling Prototypical Instances Object Diagram Modeling Object Structures Forward and Reverse Engineering Sung Kim CS 6359 Chapter 12 Slide 12