1 / 70

U nified M odeling L anguage

U nified M odeling L anguage. - . Rajthilak S Alfonso G B. Contenido. Introducción Tecnología de objetos Modelo de casos de uso Especificación de casos de uso Modelo conceptual Diagramas de clases Diagramas de secuencia. Introducción. System and models.

landis
Download Presentation

U nified M odeling L anguage

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. Unified Modeling Language - Rajthilak S Alfonso G B

  2. Contenido • Introducción • Tecnología de objetos • Modelo de casos de uso • Especificación de casos de uso • Modelo conceptual • Diagramas de clases • Diagramas de secuencia

  3. Introducción. System and models • A System is a objects collection unrelated with a common objective. • Modeling is the designing of software applications before coding. • Models are the higher level of abstraction of the System. • A model plays the analogous role in software development that blueprints and other plans (site maps, elevations, physical models) play in the building of a skyscraper. • Modeling is the only way to visualize the design and check it against requirements before one starts to code.  • Models are also the vehicle for communication with various stake holders.

  4. Tecnología de objetos. Objects evolution • Successor to the wave of Object Oriented Analysis and Design(OOA&D). • Unifies the notations used by three firends(Grady Booch, Ivar Jacobson and James Rumbaugh) in their OO methods. • Legendary book:

  5. Tecnología de objetos. Basic OO Terms • A model is an abstraction of the underlying problem. • The domain is the actual world from which the problem comes. • Models consist of objects that interact by sending each other messages. • Objects have things they know (attributes) and things they can do (behaviors or operations). • The values of an object's attributes determine its state. • Classes are the "blueprints" for objects. A class wraps attributes (data) and behaviors (methods or functions) into a single distinct entity. Objects are instances of classes.

  6. Proceso unificado. What is UML? • General-purpose modeling language • Helps to specify, visualize, and document models of software systems • High Level abstraction of the system • Represents the system using Graphical Notations from various Perspectives • used for business modeling and modeling of other non-software systems too • UML 2.0

  7. Proceso unificado. Different Perspectives of System

  8. State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams Object Diagrams Class Diagrams Component Diagrams Component Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Use Case Diagrams Sequence Diagrams Statechart Diagrams Collaboration Diagrams Models Activity Diagrams Proceso unificado. The Unified Modelling Language – 1.4 Structural Diagrams- class,object,component,deployment diagrams. Behavioural Diagrams – Use Case , Activity and State Chart diagrams. Interaction Diagrams – Sequence and Collaboration diagrams.

  9. Modelo de casos de uso. USE CASE DIAGRAM • Outsider's view of a system. • Emphasizes on what a system does rather than how. • Use case diagrams are the collection of scenarios. • A scenario is an example of what happens when someone(Actor) interacts with the system. • Scenarios together accomplishes a specific goal of the user. • Every use case diagram has actors, use cases, and communications.

  10. Especificación de casos de uso. Core Elements Introduction to UML

  11. Especificación de casos de uso. Core Relationships <<extend>> Introduction to UML

  12. Especificación de casos de uso. Core Relationships (cont’d) <<include>> Introduction to UML

  13. Especificación de casos de uso.Use Case Relationship

  14. Especificación de casos de uso. Extend and Include Relationship we can add extend relationships to a model to show the following situations: • A part of a use case that is optional system behavior • A subflow is executed only under certain conditions • A set of behavior segments that may be inserted in a base use case Include Relationship • The behavior of the inclusion use case is common to two or more use cases. • The result of the behavior that the inclusion use case specifies, not the behavior itself, is important to the base use case.

  15. Example :Use Case Diagram Introduction to UML

  16. En resumen … USE CASE DIAGRAM Use case diagrams are helpful in three areas. determining features (requirements). New use cases often generate new requirements as the system is analyzed and the design takes shape. communicating with clients. Their notational simplicity makes use case diagrams a good way for developers to communicate with clients. generating test cases. The collection of scenarios for a use case may suggest a suite of test cases for those scenarios.

  17. Diagrama de clases. Definition and types • Structural overview of a system by showing its classes and the relationships among them • Static diagrams Static relations: • Associations • Subtypes Static structure: • Attributes • Operations • Created along with use case diagrams • Transition from what? to How?

  18. Diagrama de clases. Class • The illustration uses the following UML™ conventions. • Static members are underlined. Instance members are not. • The operations follow this form:<access specifier> <name> ( <parameter list>) : <return type> • The parameter list shows each parameter type preceded by a colon. • Access specifiers appear in front of each member.

  19. Diagrama de clases. Attributes Class information: visibility and scope • Attributes and operations can be labeled according to access and scope

  20. Diagrama de clases. Operations • An operation is the implementation of a service that can be requested from any object of the class in order to affect behaviour. • Used to manipulate the attributes or to perform other actions. • Operations are normally called functions, but they are inside a class and can be applied only to objects of that class. • Signature - return-type, a name and zero or more parameters. • The signature describes everything needed to use the operation.

  21. Diagrama de clases. Example

  22. Diagrama de clases. Class-Association • Associations are structural relationships where instances (objects) of one class are connected to instances (objects) of another class. • an employee works for a company • a company has a number of offices • An association is normally bidirectional, which means that if an object is associated with another object, both objects are aware of each other (navigation is bidirectional by default). • Binary association connects exactly two classes. • The most common association is just a connection between classes.

  23. Diagrama de clases. Association adornments: name, role • The association has a name - the descriptive term, often a verb, for the association. • Each association has two association ends; each end is attached to one of the classes in the association. An end can be explicitly named with a label. This label is called a role name (association ends are often called roles).

  24. subdirectory 0..* • 0..* Directory File 0..1 parent Diagrama de clases. Reflexive Associations • A class has an association to itself. • Example: A directory may contain other directories.

  25. Diagrama de clases. Class Navigability • A navigability arrow on an association shows which direction the association can be traversed or queried.

  26. transports Car Person passenger transports 5 Car Person passenger transports * Car Person passenger transports 1..* Car Person passenger transports 2..5 Car Person passenger Diagrama de clases. Class Associations: multiplicity • Multiplicity defines the number of objects associated with an instance of the association. • Default of 1 (1: 1) • 0 or 1: 0..1 • Zero or more (0..infinite): * • 1 or more (1..infinite): 1..* • n..m; range from n to m inclusive

  27. Diagrama de clases. Class - Generalization • A specialization / generalization relationship, in which objects of the specialized element (child) are substitutable for objects of the generalized element (parent). • Superclass – the generalization of another class, the child. • Subclass – the specialization of another class, the parent.

  28. Diagrama de clases. Generalization - characteristics • Identify common features concerning behaviour and knowledge. Define these common features on a higher level in the inheritance hierarchy. • The aim is at behaviour more than knowledge when combining classes. • Generalization is a bottom-up process. • A superclass includes all common properties of its subclasses.

  29. Diagrama de clases. Specialization - characteristics • Define a new class which is a special appearance of an existing class. • Specialization is a top-down process. • A subclass can have attributes and operations that are specific for that sub-class. • A subclass may redefine operations of its super-class

  30. Diagrama de clases. Constraints • The basic constructs of association, attribute, and generalization do much to specify important constraints. • They cannot indicate every constraint. These constraints still need to be captured; the class diagram is a good place to do that. • The UML allows you to use anything to describe constraints. The only rule is that we put them inside braces { }.

  31. Diagrama de clases. CONSTRAINTS

  32. Diagrama de clases. Aggregation and Composition • Associations in which an object is part of a whole are aggregations. • Composition is a strong association in which the part can belong to only one whole -- the part cannot exist without the whole. Composition is denoted by a filled diamond at the whole end.

  33. Diagrama de clases. Aggregation and Composition

  34. Diagrama de clases. Alternative Notation for Composition

  35. Diagrama de clases. Advanced Class Concepts : Abstract • An operation is abstract if it has no implementation. • A abstract class cannot have any direct instances. • Abstract classes only occur in the context of an inheritance hierarchy. • Abstract operations and classes are specified by writing its name in italics.

  36. Diagrama de clases. Advanced Class Concepts : Abstract cont.

  37. Diagrama de clases. With Interfaces

  38. Diagrama de clases. Package Diagram • To simplify complex class diagrams, we can group classes into packages. Packages. • Packages appear as rectangles with small tabs at the top. • The package name is on the tab or inside the rectangle. • The dotted arrows are dependencies.

  39. Diagrama de clases. PACKAGE DIAGRAM

  40. Diagrama de secuencia. Interaction • Sequence diagrams and Collaboration diagrams • Class and object diagrams are static model views. Interaction diagrams are dynamic. They describe how objects collaborate. • A sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. • Sequence diagrams are organized according to time. The time progresses as we go down the page. • The Sequence diagram lists objects horizontally, and time vertically, and models these messages over time.

  41. Diagrama de secuencia. Drawing Elements • Diagram Header Elements • ActorRepresents an external person or entity that interacts with the system • ObjectRepresents an object in the system or one of its components • Unit Represents a subsystem, component, unit, or other logical entity in the system (may or may not be implemented by objects) • Separator Represents an interface or boundary between subsystems, components or units (e.g., air interface, Internet, network) • GroupGroups related header elements into subsystems or components being modeled and are laid out horizontally at the top of the diagram.

  42. Diagrama de secuencia. Body Elements • Message • Synchronous Message • Asynchronous Message • Create Message • Destroy Message • Action

  43. Diagrama de secuencia. Body Elements • Block(Loop or Conditional) • Page Break • Return Message • Free Note • Flow Note • Diagram links

  44. Diagrama de secuencia. Interaction example

  45. Diagrama de secuencia. Other example

  46. SEQUENCE DIAGRAM

  47. Diagrama de secuencia. Uses • Complex interactions between components • components are being developed in parallel by different teams • Supporting Robust interface covering multiple scenarios • Use case elaboration • can be used to flesh out the details of one or more use cases

  48. Diagrama de colaboración. Definition • Type of an interaction diagram. • Collaborates the static and dynamic relationship • Focus on Object Roles rather than timing. • Each message in a collaboration diagram has a sequence number. • The Collaboration diagram may be used to: • Describe a specific scenario by depicting the movement of messages between the objects • Show a spatial organization of objects and their interactions, rather than the sequence of the interactions

  49. Diagrama de colaboración. A example

More Related