CIS-260 Home http://www.c-jump.com/bcc/

UML, Unified Modeling Language


  1. UML, Unified Modeling Language
  2. Reading a Class Diagram
  3. Reading a Class Diagram, continued
  4. Class Notation
  5. Interface
  6. Data Types
  7. Kinds of Relationships
  8. Association Relationship
  9. Association Navigability
  10. Composition Association
  11. Dependency Relationship
  12. Generalization Relationship
  13. Realization Relationship

1. UML, Unified Modeling Language


2. Reading a Class Diagram


  • Consider ticket-selling domain model:

    • Customer, Reservation, Ticket, and Performance are classes.

    • Customers may have many reservations.

    • Each reservation is made by one customer.

    • Reservations are of two kinds:

      • subscription series

      • individual reservations.

  • Class diagram for ticket box application:

      class diagram

3. Reading a Class Diagram, continued


  • Subscription reservation can reserve several tickets.

  • Individual reservation is capable of reserving only a single ticket.

  • Every performance has many tickets available.

  • Each ticket has unique seat number.

  • A performance can be identified by a show, a date, and time.

  • Class diagram for ticket box application:

      class diagram

4. Class Notation


  • A class defines a set of objects that have state and behavior.

  • Attributes store data values such as members and strings.

  • Object behavior is determined by its operations.

  • The lifetime of an object is described by a state machine attached to a class.

    class notation

5. Interface


  • An interface is the description of behavior of objects without implementation or state.

  • One or more classes or components may realize an interface.

  • Class that implements the interface implements the operations found in the interface.

    nameable dog

6. Data Types


  • Primitive types include numbers and strings.

  • Primitive types are passed around by value.

  • Operations may return data values as results.

    printer hierarchy

7. Kinds of Relationships


8. Association Relationship


  • Association provides description of a connection among instances of classes.

  • Most common kind of association is a binary association between a pair of classes.

  • Associations carry information about relationships among objects in a system.

  • As a system executes, links among objects are created and destroyed.

  • Associations are the glue that ties a system together.

    association notation
  •  

  • Without associations, there are nothing but isolated classes that don't work together.

  • Most important property of association is multiplicity.

  • Multiplicity specifies how many instances of one class can be related to one instance of the other class.

9. Association Navigability


10. Composition Association


11. Dependency Relationship


12. Generalization Relationship


  • A relationship between classes involved in inheritance and polymorphic behavior.

  • For example,

    • A mortgage is a more specific kind of loan.

    • A mortgage keeps the basic characteristics of a loan, but adds additional characteristics, such as a house as security for the loan.

  • Generalization enables polymorphic operations.

    generalization notation

13. Realization Relationship


  • Realization relationship is specified between interface and its implementation.

  • The realization relationship is like generalization in which only behavior specification is inherited rather than structure of attributes or implementation.

    nameable dog