1 / 20

UML Basic Structural Modeling

UML Basic Structural Modeling. Part II. Basic Structural Modeling. Classes Attributes, Operations, Responsibilities Relationships Dependency, Generalization, Association, Role, Multiplicity, Aggregation Common Mechanisms

Mercy
Télécharger la présentation

UML Basic Structural Modeling

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. UMLBasic Structural Modeling Part II

  2. Basic Structural Modeling • Classes • Attributes, Operations, Responsibilities • Relationships • Dependency, Generalization, Association, Role, Multiplicity, Aggregation • Common Mechanisms • Specifications, Adornments, Common Divisions, Extensibility Mechanisms • Diagrams • Class , Object , Component , Deployment Dagrams

  3. Common Mechanisms • Specifications • Adornments • Notes • Common Divisions • Extensibility Mechanisms • stereotypes • tagged values • constraints

  4. Note Adornments: Note • Adornment that stands alone • Note is a graphical symbol for rendering constraints or comments attached to an element • Used to specify things like requirements, oservations, reviews, and explanations • Can be simple text,an embedded URL, a link to a document

  5. Mission full_name : string Shuttle start_engines() stop_engines() fuel_level() : integer launch(t:time) Adornments: Note • Examples See URL Shuttle.nasa.gov Launch time is computed from ephemeris

  6. Stereotypes • Allows to extend the vocabulary of the UML • Allows to create new building blocks, specific to your problem • Can be applied to any element (Class, Attribute, Operation, …) • Can be represented by • << stereotype >> • new icon • both

  7. Stereotypes • a class can have a stereotype indicating what basic type of class it is (e.g. controller, actor, interface) • represent a metaclassification of the class • appear within guillemets in normal type above the class name «user interface» Window size : Area = (100, 100) visibility : Boolean = invisible display () hide ()

  8. Operation Stereotypes • stereostypes can also be used to group together operations with common characteristics • represent a metaclassification of the operation «exception» BadSocket throw() log (String) «helper» setSocket(Socket) «access» getID():SocketID setID(SocketID)

  9. << NASA Object >> Shuttle weight : Integer age : Integer status: enum = on-ground Stereotypes Examples Spacecraft

  10. Tagged Values • Apply to any element of the UML • Metadata that applies to the element not its instances • Represent arbitrary information expressed in text form • Commonly used to store Project Management information • Examples: • author of an element Author=John Smith • testing status Test = No • version number Version # = 4.2

  11. Constraints • restrict the values that object or links can assume • expressed as arbitrary expressions enclosed in braces near the constrained elements • often use navigation expressions • constraints between two elements are depicted using a dotted, labeled line 4..6 Member-of * Astronaut {subset} Crew 1 * Commander-of

  12. Constraint Examples boss worker * employer employee Person Company * {person.employer = person.boss.employer}

  13. Hint and Tips • Do not abuse Notes, Stereotypes and Tagged Values • Should be used for enhancing communication • Make sure that there is no other way to express what you want • Use Notes as links to documents when too long

  14. Diagrams • Class Diagram • Classes, Interfaces, Collaborations • Object Diagram • Objects • Component Diagram • Components • Deployment Diagram • Nodes

  15. Diagrams • Used to organize the elements of interest • Nine diagrams in UML • Present 5 different Views: • Use Case, Design, Process, Implementation and Deployment Views

  16. Class Diagram • General properties • Name • Graphical content which is a projection into the model • Specific Properties • Contains Classes, Interfaces, Collaborations, Relationships • Sometimes put package, subsystem and instances

  17. Class Diagram • shows a set of Classes, Interfaces and Collaborations • captures the static structure of the system • foundation for the other models • describes the properties and relationships of the objects in the system • all icon/diagram components are optional (you can show as much or as little information as appropriate) • model vocabulary of system • model simple collaborations • model logical database schema

  18. Class Diagram Example Company Office Department Headquarters Person

  19. Hints and Tips • Multiple Class Diagrams are usually needed • Each focus on different aspects of the system • Provides detail consistent with its level of abstraction • Layout is important to convey the information • things semantically close should be physically close • no crossing lines for relationships • When Diagram becomes complex, break it into multiple diagrams

  20. Class Diagram Modeling Exercice • Develop a Class Diagram describing a school

More Related