Introduction to Modeling Java and UML

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Introduction to Modeling Java and UML - Presentation Transcript

    1. Chapter 1 Introduction to Modeling Java and UML 鄧姚文 [email_address] http://w3.im.knu.edu.tw/~joseph
    2. Agenda
      • What is modeling?
      • UML
      • Modeling software systems with UML
      • Modeling process
    3. Introduction
      • Why Java?
        • A good object-oriented programming language
        • Web-enabled enterprise computing (J2EE)
        • Excellent support for exception handling and concurrency
      • Other OO languages
        • Small Talk, C++, Object Pascal, C#, Python
    4. Goal of This Book
      • Be able to
        • Communicate an understanding of OO modeling theory and practice to others
        • Communicate an understanding of UML notation to others
        • Critically review a wide variety of UML software models
        • Use UML to create a detailed understanding of the problem from the user’s perspective
        • Use UML to visualize and document a balanced solution using the full suite of Java technologies
        • Use UML to describe other technologies and class libraries
    5. What Is Modeling?
      • A model is a simplification with a purpose
      • Use precisely defined notation to describe and simplify a complex and interesting structure, phenomenon, or relationship
      • Real-world examples
        • The solar system model
        • Mathematical models
    6. 地軸傾斜 北極冬天沒陽光 南極夏天沒黑夜 以太陽系模型說明極地永晝與永夜
    7. What Is Modeling? (cont’d)
      • Simplification
        • Less complex, more accessible
      • Varying perspectives
        • Describe the system from different perspectives
        • Help developers manage complexity
      • Common notation
        • To facilitate communication
        • Allows developers to combine their efforts and to work in parallel
    8. UML
      • Unified Modeling Language
      • A language for specifying, visualizing, constructing, and documenting the artifacts of software systems
      • A set of precise notations
      • Helps developers create ideas and communicate them
      • An open standard controlled by OMG
    9. UML The Basics
      • Abstraction 抽象化,摘要
        • 只要抓住重點,不必每樣細節都考究
        • A simplification or model of a complex concept, process, or real-world object
        • Help people understand something at an appropriate level
        • Different people would build different abstractions for the same concept
        • Highlight the characteristics and behavior of something that is too complex to understand in its entirety
    10. UML The Basics
      • Encapsulation 封裝
        • 凸顯重要特質隱藏內部細節
        • Highlight the important aspects of an object
        • Hide the cumbersome internal details of the object
        • Make the system easier to understand and to reuse
        • Make a system more extendible
    11. UML The Basics
      • Object
        • A particular and finite element in a large model
          • Visible or invisible
          • Persistent or transient
        • State: describes characteristics and current condition
        • Behavior: defines the actions that other objects may perform on the object
        • Method: a service or responsibility that an object exposes to other objects
        • Each has a unique identifier
        • Limited responsibility and cooperation
    12. UML The Basics
      • Class
        • A group of objects that have something in common
        • Captures a particular abstraction
        • Provides a template for object creation
        • Each objects created from a class is identical in
          • The type of data they can hold
          • The type and number of objects they know about
          • The logic for any behavior they provide
    13. UML The Basics
      • Relationships between objects
        • Dependency
        • Association
        • Aggregation
        • Composition
    14. Dependency
      • Short-term dependency
      • An object may create another object as part of a method, ask it to perform some function, and then forget about it
    15. Association
      • An object keeps a reference to another object and can call the object’s, methods as it needs them
      • An object may receive an object as a parameter to a configuration method and keep a reference to the object
    16. Aggregation
      • An object is part of a greater whole
      • The contained object may participate in more than one aggregation relationship, and exists independently of the whole
    17. Composition
      • An object is owned by a greater whole
      • The contained object may not participate in more than one composition relationship and cannot exist independently of the whole
    18. UML The Basics
      • Navigability
        • The control relationship
        • The arrow indicates direction of control
    19. UML The Basics
      • Multiplicity
        • The number of relationships
        • No default multiplicity
    20. UML The Basics
      • Interface
        • Defines a set of related behavior
        • Does not specify the actual implementation for the behavior
          • Specify the signature of one or more methods
        • A class realizes an interface by implementing each method in the interface
    21. UML The Basics
      • Polymorphism
        • Multiple implementation of a single abstraction
          • Abstraction are captured in classes and in interfaces
    22. Polymorphism Through Realization
    23. Polymorphism Through Inheritance
    24. Modeling Software Systems with the UML
      • UML enables building a single coherent model that describes a software system from several perspectives
        • Internal consistency
        • Distinct views
      • Participants can use the same model and speak the same language throughout the development process
    25. The Customer’s Perspective
      • Use case
        • Defines and describes a discrete way in which users get value from the system
      • Text description of each use case
        • Including the details of the interactions between the user and the system
      • Activity diagram
        • Visual description of the interaction between the system and the user for a use case
    26. The Developer’s Perspective
      • Class diagram
        • Defines and constrains a group of objects in detail
        • Shows the state, behavior, and relationships
      • State chart
        • Describe the state-dependent behavior for a class
        • How an object responses to requests depending on its internal configuration
      • Package diagram
        • How different parts of a system depend on one another
    27. The Developer’s Perspective (cont’d)
      • Sequence diagram
        • How objects interact with one another to provide the functionality
        • Indicates the order of the interaction
      • Collaboration diagram
        • Revealing the relationship between objects
    28. Modeling Process
      • The developers and customers use the UML to understand the problem from the customer’s point of view
      • The developers use UML to understand the problem from their own point of view
      • The UML model is used as a resource by the implementers of the system
    29. Modeling Process (cont’d)
      • Requirements gathering
      • Analysis
      • Technology selection
      • Architecture
      • Design and implementation
    30. Requirements Gathering
      • Understand the problem from the customer’s point of view
      • Do NOT concern for technology or system design
      • In this process, developers create
        • Use case diagrams
        • Text use case descriptions
        • Activity diagrams
    31. Analysis
      • Understand the problem from the developer’s point of view
      • Still do NOT concern for technology
      • Discover the roles and responsibilities that must be filled in the system
      • In this process, developers create
        • Class diagrams
        • Sequence diagrams
        • Collaboration diagrams
    32. Technology Selection
      • Categorize the system in terms of its technological requirements
      • Select the most appropriate technologies to fulfill these well-defined needs
      • Produce a high-level summary of the technological requirements and a list of appropriate technologies for the system
      • No additional UML diagrams are produced
    33. Architecture
      • Describe the system at high level
      • Decompose the system into smaller parts (subsystems)
      • Highlight relationships between parts
      • Hide details of each part
      • In this process, developers create
        • Primary class diagrams
        • Package diagrams
    34. Design and Implementation
      • Design
        • Use all the results from the previous steps
        • Create a model of objects that interact to provide the system’s functionality
        • The last chance to validate the solution
      • Implementation
        • Write the code according to the design

    + ohiseeohisee, 2 years ago

    custom

    480 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 480
      • 480 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 30
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories