1 / 25

Chapter Two The UML – Unified Modeling Language

Chapter Two The UML – Unified Modeling Language. Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University. Outline. Overview What is the UML? Why use the UML? The class diagram Interaction Diagrams Summary.

nora-odom
Download Presentation

Chapter Two The UML – Unified Modeling Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter TwoThe UML –Unified Modeling Language Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

  2. Outline • Overview • What is the UML? • Why use the UML? • The class diagram • Interaction Diagrams • Summary The Unified Modeling Language

  3. Overview • A brief overview of the Unified Modeling Language (UML) • What the UML is and why to use it • Essential UML diagrams • The Class Diagram • The Interaction Diagram The Unified Modeling Language

  4. Outline • Overview • What is the UML? • Why use the UML? • The class diagram • Interaction Diagrams • Summary The Unified Modeling Language

  5. What is the UML? • A visual language to create models of programs • A drawing notation with semantics • A diagrammatic representation of the programs • Different diagrams for • Analysis • Design • Implementation (dissemination) The Unified Modeling Language

  6. UML Diagrams • In the analysis phase • Use Case Diagrams • Entities interacting with the system • Function points • Activity Diagrams • Workflow of the problem domain • Looking at object interactions • Interaction Diagrams • How specific objects interact with each other • Sequence Diagram is the most popular The Unified Modeling Language

  7. UML Diagrams • In the design phase • Class Diagrams • Detail the relationships between the classes • Looking at an object’s behaviors • State Diagrams • Detail the different states an object may be in • The transitions between these states • In the deployment phase • Deployment Diagrams • How different modules will be deployed The Unified Modeling Language

  8. Outline • Overview • What is the UML? • Why use the UML? • The class diagram • Interaction Diagrams • Summary The Unified Modeling Language

  9. Why Use the UML? • For communication • With yourself, team members and customers • For clarity • To determine if my understanding of the system is the same as others • For precision • A better way of describing object-oriented designs • Force the designer to think through his/her approach The Unified Modeling Language

  10. Outline • Overview • What is the UML? • Why use the UML? • The class diagram • Interaction Diagrams • Summary The Unified Modeling Language

  11. The Class Diagram • The most basic of UML diagram • Describe classes • Show the relationships between them • When one class is a “kind of” another class • is-a relationship • When there are associations between two classes • One class “contains” another class: the has-a relationship • Composition: the contained item is a part of the containing item • Aggregation: a collection of things that can exist on their own • One class “uses” another class The Unified Modeling Language

  12. Class Information • Each rectangle represents a class • The name of the class • The data members of the class • The methods (functions) of the class • Notation for access • Public • Notated with a plus sign (+) • Protected • Notated with a pound sign (#) • Private • Notated with a minus sign (-) The Unified Modeling Language

  13. Square Square +display() -length : double +display() Class Diagram – Its Three Variations • Whenever we refer to a class name, we will bold it as done here. Square The Unified Modeling Language

  14. Shape Line Square Point Class Diagram – is-a relationship • Shape is italicized – meaning it is an abstract class The Unified Modeling Language

  15. Aircraft Jet Helicopter Airport Class Diagram – has-a relationship • Aggregation ( an unfilled diamond ) • Airport has Aircraft • Aircraft is not part of Airport The Unified Modeling Language

  16. Car Tire Gas Station Class Diagram – has-a relationship • Composition ( an filled diamond ) • The contained object is a part of the containing object • A Car has Tires as parts • Use relationship • A dash line with an arrow • Also called dependencyrelationship The Unified Modeling Language

  17. Aircraft Jet Helicopter Airport Notes in the UML • A note • A box containing the message open diamondsmean aggregation The Unified Modeling Language

  18. Aircraft Jet Helicopter Airport The Cardinality of the Relationship • How many aircraft does an airport have? 0..* 0..1 open diamondsmean aggregation The Unified Modeling Language

  19. Car Tire Gas Station The Cardinality of the Relationship • Tires are on exactly one car. 1 4..5 The Unified Modeling Language

  20. Outline • Overview • What is the UML? • Why use the UML? • The class diagram • Interaction Diagrams • Summary The Unified Modeling Language

  21. Interactive Diagram • Class diagrams • Static relationships • Interactive diagrams • Showing how objects interact with each other • Sequence diagram • The most common type • Reading from top to down • Object:Class notation The Unified Modeling Language

  22. Sequence Diagram The Unified Modeling Language

  23. Outline • Overview • What is the UML? • Why use the UML? • The class diagram • Interaction Diagrams • Summary The Unified Modeling Language

  24. Summary • Do not worry so much about creating diagrams the “right” way. • If you think something needs to be said, use a Note to say it. • If you aren’t sure about an icon or a symbol and you have to look up to find out its meaning, include a note to explain it since others may be unclear about its meaning, too. • Go for clarity. The Unified Modeling Language

  25. The End

More Related