Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 1.

Similar presentations


Presentation on theme: "Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 1."— Presentation transcript:

1 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 1

2 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 2 Agenda u UML - What is it. u UML - Where and how did it originate. u Structural Diagram Overview u Behavioral Diagram Overview u Design Processes Using UML –Use Case Diagrams –Use Case Narratives –Class Diagrams –Design Class Diagrams –Class-Responsibility-Collaboration (CRC) Cards –System Sequence Diagrams –Contracts –Interaction Diagrams –Collaboration Diagrams

3 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 3 Unified Modeling Language (UML) - What is it? u UML is a modeling language used as a “language whose vocabulary and rules focus on the conceptual and physical representation of a system”. u Its purpose is to “visualize, specify, construct, and document the artifacts of a software-intensive system”.

4 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 4 The History of UML - From Whence It Came? u Object-oriented programming languages originated in the late seventies and early eighties. u Object-oriented modeling languages originated as a set of methodologies needed for analysis and design of OO applications and programs. u By the early nineties, many OO modeling languages were in existence, including: –Object-Oriented Software Engineering (OOSE) - Booch & Jacobson –Object Modeling Technique (OMT) - Rumbaugh –Fusion –Yourdon u OOSE & OMT became the more recognized and accepted methodologies.

5 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 5 The History of UML - From Whence It Came? u By the mid-nineties, a common set of expectations and ideas began to form. u These two primary modeling languages began to evolve toward one another. u The primary authors, Booch, Jacobson, and Rumbaugh recognized the need to unify these modeling languages. u Hence, the Unified Modeling Language (UML) was born. u This unification is a significant step in the OO world since a recognized language can now be utilized. u Common creative energies can now be focused toward improving and extending one language as compared to opposing, competing languages.

6 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 6 Unified Modeling Language (UML) - What is it? u UML Version 1.0 was submitted to the Object Management Group (OMG) in January 1997 as a proposed standard modeling language. u UML Version 1.1 was submitted for standardization in July 1997 and was officially adopted by OMG in November 1997. u Maintenance is now officially performed by the OMG Revision Task Force (RTF). u Version 1.2 was released in June 1998 with Version 1.3 being released in October 1998. u Both these versions were generated through the OMG RTF. u Please refer to the OMG website for information regarding the OMG organization, http://www.omg.org/ u Formal UML documentation may also be obtained from the OMG website, http://www.omg.org/uml/

7 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 7 UML Diagrams u UML contains two different types of modeling diagrams. –Structural Type Diagrams (Static Representations) F Class Diagrams F Class-Responsibility-Collaboration (CRC) Cards F Object Diagrams F Component Diagrams F Deployment Diagrams –Behavioral Type Diagrams (Dynamic Representations) F Use Case Diagrams F Sequence Diagrams F Collaboration Diagrams F Statechart Diagrams

8 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 8 Structural Diagrams u Classes:Defines classes, interfaces, collaborations, and relationships. u Class-Responsibility-Collaboration (CRC) Cards: Defines a high-level description of class responsibilities. u Objects:Defines objects and their relationships at a given point in time. u Components:Defines components and their relationships from a perspective of a software architecture. u Deployment:Defines a configuration from a perspective of a hardware computing architecture.

9 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 9 Behavioral Diagrams u Use Case:Defines a set of use case specifications, actors, and their associated relationships. u Sequence:Defines a set of interactions or messages between objects relative to order or time. u Collaboration:Defines a set of interactions or messages between objects relative to time. u Statechart:Defines a type of state machine that consists of states, transitions, and events. u Activity:Defines the flow from activity to activity. These emphasize the flow of control among objects.

10 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 10 Use Case Diagram u A use case diagram graphically illustrates a set of activities within a system. u Use case diagrams are primarily used to denote external interactions to a system. u The stick figures represent actors that externally participate or stimulate the interaction. u The arrows demonstrate that there are relationships between the actors and the activities denoted by the ovals.

11 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 11 Use Case Narratives u Use Cases describe a set of interactions with a system. u Boundaries are identified to distinguish between external events and internal events. u The external events define external influences on a system. u The internal events define the system response to these external influences. u Several different types of Use Case narratives can be utilized. –High Level: Typically used within initial conceptual designs. –Expanded: Used to provide more detail by including actions and responses. Usually does not include implementation details. –Real: Uses the same format as expanded use cases. Includes specific implementation aspects, I/O, frameworks, dialogs, etc. Typically used within detailed design.

12 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 12 Use Case Narratives

13 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 13 Identifying Classes and Objects u Once Use Cases have been created, conceptual models can be developed using the information contained within the Use Cases. u Conceptual models will include objects, associations between objects, attributes of the objects, and multiplicity between objects. u Many different methods exist for identifying concepts and objects. However, one effective method is the identification of nouns and noun phrases contained within the Use Cases. u Each individual noun phrase can identify a specific concept or object. u Many objects will form the basis of Class Diagrams and Design Class Diagrams.

14 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 14 Class Diagrams u Each rectangle defines a class with the name represented in the first compartment. u Attributes of the class are represented in the second compartment. u Operations of the class are represented in the third compartment. u Attributes and operations can be denoted as public or private as depicted with the attached icons. Name Attributes Operations

15 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 15 Design Class Diagrams u Design Class Diagrams are used to model static representations of a system. u Design Class Diagrams are similar to the Object Relationship Model of OSM. u They will typically include the following characteristics: –Classes or objects participating within a given diagram. –Associations or Relationships between these classes or objects. –Multiplicity or the number of instances of the associations. –Attributes of the class or object. –Operations of the class or object. –Dependencies and generalizations.

16 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 16 Design Class Diagrams - Conceptual Modeling Associations Multiplicity

17 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 17 Class-Responsibility-Collaboration (CRC) Cards u CRC cards can be used as alternatives to Design Class Diagrams. u CRC cards are intended to provide a more simplified approach in identifying classes and their respective responsibilities. u The approach is simplified since the CRC method is intended to capture a high-level description of the purpose of the class. u The class descriptions should fit on a 4 x 6 index card. u This approach forces the descriptions to be concise and conceived at a higher level. u In addition to the responsibilities, collaborations with other classes are defined. u These collaborations indicate other classes that will fulfill a portion of the listed responsibilities.

18 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 18 Class-Responsibility-Collaboration (CRC) Cards u CRC cards contain three (3) primary components of information, Class Name, Responsibility of the Class, and any Collaborations with other classes.

19 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 19 System Sequence Diagrams u System Sequence Diagrams are used to identify time ordering of messages. u These diagrams depict a set of objects and the messages sent to and from these objects. u System Sequence Diagrams can correspond to Use Case Narratives. u In this case, system events and system operations are modeled. –System events are events that are generated from external stimuli. –System operations are operations that occur as a result of a system event.

20 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 20 System Sequence Diagrams

21 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 21 Contracts u A Contract is a document that expands upon each system event and system operation specified within a Sequence Diagram. u Its purpose is to provide specific information associated with each event or operation. u Primary components of the contract are exception conditions, pre- conditions, and post-conditions. u Pre-conditions are assumptions regarding the state of the system at the beginning of the operation. u Pre-conditions should describe: –Conditions describing testing scenarios should be included. –Conditions required for the success of the operation should also be included.

22 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 22 Contracts u Post-conditions are assumptions regarding the state of the system after the operation. u These are described as: –Visualizing the system as a stage before the operation. –Lower a curtain and initiating the operation. –Raising the curtain and describing the changes on the stage. u Post-conditions should describe: –Instance creations and deletions. –Attribute modifications. –Associations that have been formed or broken. u Exception conditions may also be specified within contracts. These will typically be system type exceptions. u Notes may also be included. These should include specific design details and documentation.

23 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 23 Contracts

24 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 24 Interaction Diagrams u Interaction type diagrams utilize information created during a “conceptual design phase” and begin the formulation of the “detailed design phase”. u Interaction diagrams depict message interactions between instances and classes defined in the class model. u The message interactions are obtained from the information specified within Contract post-conditions. u Two different types of interaction diagrams can utilized. These are collaboration diagrams or sequence diagrams. –Collaboration diagrams depict interactions in a graphical or network format. –Sequence diagrams depict interactions in a type of matrix format. u Collaboration diagrams appear to be more expressive and flexible.

25 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 25 Collaboration Diagrams Instance First Message Parameters Direction of Message Message # Link Line

26 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 26 Collaboration Diagrams u Collaboration diagrams can be very expressive. u As partially expressed in the previous example, the following notations may be represented: –Message Sequencing including Internal Object Messages. –Message Parameters. –Return Values. –Iteration Clauses. –Instance Creations. –Conditional Messages. –Conditional Message Paths. –Collections. –Messages to Multiple Objects.

27 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 27 Diagram Development Process Sequencing Use Case Narratives Class Diagrams Use Case Diagrams Nouns Phrases Sequence Diagrams System Events & Operations Contract Diagrams System Events & Operations Collaboration Diagrams Post Conditions

28 Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 28 References u Booch, Rumbaugh, and Jacobson, “Unified Modeling Language User Guide”, Addison-Wesley © 1999, ISBN 0-201-57168-4. u Rumbaugh, Jacobson, and Booch, “Unified Modeling Language Reference Manual”, Addison-Wesley © 1999, ISBN 0-201-30998-X. u Fowler and Scott, “UML Distilled: Applying the Standard Object Modeling Language”, Addison-Wesley © 1997, ISBN 0-201-32563-2. u Larsen, “Applying UML and Patterns: An Introduction to Object- Oriented Analysis and Design”, Prentice Hall © 1998, ISBN 0-137- 48880-7. (CSCI 311 - Object-Oriented Analysis and Design) u Rational Rose Professional Edition 1998. u Several other books are also available. Please refer to the Addison Wesley Object-Technology series.


Download ppt "Object-Oriented Database SystemsCSCI 397C-16 Unified Modeling Language (UML) Prepared By: Keith Bryant 02 Nov 99 - Page 1."

Similar presentations


Ads by Google