Depending on the modeling goal ie depending on the

This preview shows page 93 - 95 out of 182 pages.

Depending on the modeling goal, i.e., depending on the purpose of the 6. A comprehensive overview of the different modelling elements of the UML can be found e.g., in [OMG 2007] . Person Name Birth date owns 0..* 1 Vehicle Vehicle ID Year of cons. Multiplicities owner owned Roles Vehicle Vehicle ID Car #Seats Truck Payload [Name] Classes Attributes Association [Name] 1..* Multiplicities Generalization Aggregation Composition Whole Part Whole Part Part Modeling elements Modeling examples 0..1 m ג | N + m n..m n ג | N Methods
Image of page 93

Subscribe to view the full document.

6.5 Requirements Modeling in the Data Perspective 75 model, the compartments for attributes and/or methods can also be hid- den or left out entirely. Associations, multiplicities, and roles Associations between classes are depicted by edges. Associations can optionally be given a name. In addition, multiplicities can be annotated at each end of an association. Multiplicities are statements about the instance level of a class and depict how many instances of a class may be associated in a particular way with a defined number of instances of another class. By annotating optional roles at one or both ends of an association, the mean- ing of the instances of a class with regard to the association can the further refined. Aggregation and composition Aggregations and compositions are specific types of associations. Both describe a relationship between a whole and its constituents. A composi- tion documents a stronger binding than an aggregation in that a constitu- ent in a composition cannot exist without its whole. In class models of the UML, an aggregation is depicted as an empty diamond and a composition is depicted as a filled diamond. Generalization Moreover, in class diagrams, generalizations between classes can be documented. A generalization between classes of the UML is a relation- ship between a more specific class (the sub-type) and a more general class (the super-type). The sub-type in a generalization relation inherits all properties of the super-type and can adapt and/or extend these. Example of a UML Class Diagram The class diagram in figure 6-9 comprises six classes that all have respec- tive attributes. The associations between the classes are depicted by means of edges. For example, an association with the name “calculates” exists between the class “navigation device” and the class “route”. Taking into account the multiplicities, this association depicts that a navigation sys- tem can calculate an arbitrary amount (at least zero, as depicted by an asterisk *) of routes. In return, every route can be calculated by an arbi- trary amount (*) of navigation devices. A route is an aggregation of at least one, but arbitrarily many (1..*) road segments, and every road seg- ment belongs to an arbitrary amount (*) of routes. A road segment is defined by a road name as well as start and end points. Figure 6-9 also shows that “navigation device w/ congestion avoiding” is a specialization of the generic type “navigation device”. The sub-type “navigation device
Image of page 94
Image of page 95

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes