1 / 15

UML class diagram : example

UML class diagram : example. INSPIRE UML class diagram for administrative units. UML ( Unified Modeling L anguage ). Class. Definition: description of a set of objects that share the same attributes, operations, relationships, and semantics.

ember
Download Presentation

UML class diagram : example

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. UML class diagram: example INSPIRE UML class diagramfor administrative units

  2. UML (UnifiedModelingLanguage)

  3. Class • Definition: description of a set of objects that share the same attributes, operations, relationships, and semantics. • Objects are also called «instances» of the class

  4. Class class name (convention: UpperCamelCase) Car attribute type visibility + seatNumber : Integer + colour: Colour[1..*] multiplicity –[min..max] (default: exactly 1) attribute name (convention: lowerCamelCase) « A car ischaracterised by a seatnumber and one or severalcolors. »

  5. Inheritage / generalisation • Definition: taxonomic relationship between a more general element and a more specific element. • Representation: ClassA ClassB « A ClassBinstance isalso a ClassAinstance » « ClassBinstances share the samecharacteristics as Class A instances » « ClassBspecialisesClassA » « ClassAis more abstract / generalisedthanClassB » ...

  6. Inheritage / generalisation abstract classes(shown in italics) cannot have instances Vehicle ownerName : String constructionDate : Date Bus Car Boat passengerNb : Integer draft : Float « Cars, boats, and buses are vehicles » « All vehicleshave a construction date » « A bus is a vehiclewith a passengernumber value » …

  7. Association • Definition: relationshipbetween classes thatspecifies connections betweentheirinstances • Example: roleB AssotiationName roleA ClassA ClassB c..d a..b employee Employment employer Company Person 0..* 1..*

  8. Multiplicity • Examples: employed employer Company Person Employment 0..* 0..* « Companies and persons are linkedwith an employment relation  » « A personcanbeemployed by zero, one or severalcompanies » « A companycanemployzero, one or severalpersons » parent Kinship 2 « There is a kinship relation betweenindividuals » « All individuals have exactly 2 parents » « Eachindividualcan have no, one or severalchildren » 0..* Individual child

  9. Aggregation • Definition: Aggregationrelationshipbetween instances of a class and several instances of anotherclass • Example: AggregateClass AggregatedClass c..d a..b « A ClassAinstance isan aggregate of instances of classB » Country Region * 1 « A country is an aggregation of regions »

  10. Composition • Definition: Composition relationshipbetween instances of a class and several instances of another classe (theycannotexistindependently • Example: CompositeClass ComponantClass * 1 « A classA instance is a a composite of instances of classB » Book Page 2..* 1 « A book iscomposed of pages (at least two) »

  11. Navigability • Definition: Indication, whether instances of one class cansee or know about instances of another class to whichthey are relatedthrough an association supplier user Company Person * 0..2 « A Person instance knows the Companyinstances itisassociatedwith » « A Company instance does not know the Person instances itisassociatedwith »

  12. Note • Definition: Comment or a constraint attached to a diagram element. • Usually linked to the element it is related to (with dashed line) • In natural language ClassA Comment on classA

  13. Constraint • Definition: condition or restriction to satisfy. • Can be represented in {…} or in a note • In natural language, or OCL (when possible) ClassA ClassA objects should be like this {ClassAobjectsshould belikethat}

  14. Stereotype • Definition: Stereotypes extend the semantics, but not the structure of pre-existing UML elements (classes, attributes, operations, associations, roles, packages) • UML representation: << stereotypeName>> ClassName << stereotypeName>> + attributeName : DataType

  15. Exercise: Whatisrepresentedhere? INSPIRE UML class diagramfor administrative units

More Related