2 OOSE Modeling with UML.pdf

download 2 OOSE Modeling with UML.pdf

of 6

Transcript of 2 OOSE Modeling with UML.pdf

  • 8/10/2019 2 OOSE Modeling with UML.pdf

    1/6

    Object Oriented Software Engineering Notes

    K S V Krishna Srikanth, Dept of IT, ANITS Page 11

    2. MODELING WITH UML

    INTRODUCTION TO UML (UNIFIED MODELING LANGUAGE)

    UML is a standard language for specifying, visualizing, constructing, and documenting the

    artifacts of software systems. UML was created by Object Management Group (OMG) and

    UML 1.0 specification draft was proposed to the OMG in January 1997.

    What is UML?UML is an acronym for Unified Modeling Language.Unified:

    Unification of earlier object-oriented analysis and design methods.

    Same concepts and notation for different application domains and differentdevelopment processes.

    Same concepts and notation through the whole development lifecycle.

    Combines the best from existing object-oriented software modeling methodologies.

    Grady Booch, James Rumbaugh, and Ivor Jacobson are the primary contributors toUML

    Modeling

    Used to present a simplified view of reality in order to facilitate the design and

    implementation of object-oriented software systems.

    Making a semantically* COMPELETE abstraction of a system. (* The formalspecification of the meaning and behavior of something)

    Language

    UML is primarily a graphical language that follows a precise syntax.

    Where did UML come from?

    OO modeling languages made their appearance in the late 70s. As the usefulness of OO programming became undeniable, more OO modeling

    languages began to appear.

    By the start of the 90s there was a flood of modeling languages, each with its own

    strengths and weaknesses.

    In 1994 the UML effort officially began as a collaborative effort between Booch and

    Rumbaugh. Jacobson was soon after included in the effort.

    The goal of UML is to be a comprehensive modeling language (all things to allpeople) that will facilitate communication between all members of the developmenteffort.

    Overview of UML

    UML is a language.

    o Conforms to specific rules.o Allows the creation of various models.o Does not tell the designer which models need to be created.

    UML is a language for visualizing.o UML is a graphical language.

  • 8/10/2019 2 OOSE Modeling with UML.pdf

    2/6

    Object Oriented Software Engineering Notes

    K S V Krishna Srikanth, Dept of IT, ANITS Page 12

    o Pictures facilitate communication (a picture is worth a thousand words).

    UML is a language for constructing and understanding.

    o UML supports both forward and reverse engineering.

    UML is a language for documenting designo Provides a record of what has been built.

    o Useful for bringing new programmers up to speed.o Useful when developing new releases of product.

    UML is intended primarily for software-intensive systems

    UML is a language,For visual izing:

    Facilitates communication between/among developers/clients.

    Its a graphical language.For specif ying:

    Building models those are precise, unambiguous and complete.

    UML addresses the specification of all the important analysis, design andimplementation decisions.

    For const ruct ing:

    Models can be directly connected to variety of programming languages.

    Mapping permits forward engineering, the generation of code from UML model

    into programming language.

    Possibility of reverse engineering.

    UML model is sufficiently expressive and unambiguous to permit the direct

    execution of models, simulation of system and instrumentation of runningsystems,

    For Document ing:

    Addresses the documentation of system architecture and all of its details. Artifacts include requirements, architecture, design, source code, test and etc.

    Where can UML be used?Intended primarily for software-intensive system such as:

    Enterprise information systems Banking and financial systems Telecommunications Transportation Defense/aerospace Retail Medical electronics Scientific Distributed web-based services, etc.

    OMG is continuously putting effort to make a truly industry standard.UML stands forUnifiedModelingLanguage.

    UML is different from the other common programming languages like C++, Java, andCOBOL etc.

  • 8/10/2019 2 OOSE Modeling with UML.pdf

    3/6

    Object Oriented Software Engineering Notes

    K S V Krishna Srikanth, Dept of IT, ANITS Page 13

    UML is a pictorial language used to make software blue prints.

    UML is not a programming language but tools can be used to generate code in various

    languages using UML diagrams. UML has a direct relation with object oriented analysis and

    design. After some standardization UML become an OMG (Object Management Group)standard.

    A conceptual model of UML:To understand conceptual model of UML first we need to clarify What is a conceptual model?and Why a conceptual model is at all required? A conceptual model can be defined as a model which is made of concepts and their

    relationships. A conceptual model is the first step before drawing a UML diagram. It helps to

    understand the entities in the real world and how they interact with each other.As UML describes the real time systems it is very important to make a conceptual model andthen proceed gradually. Conceptual model of UML can be mastered by learning thefollowing three major elements:

    UML building blocks Rules to connect the building blocks Common mechanisms of UML

    OO Analysis and DesignObject oriented analysis can be defined as investigation and to be more specific it is theinvestigation of objects. Design means collaboration of identified objects. So it is importantto understand the OO analysis and design concepts. Now the most important purpose of OOanalysis is to identify objects of a system to be designed. This analysis is also done for anexisting system. Now an efficient analysis is only possible when we are able to start thinkingin a way where objects can be identified. After identifying the objects their relationships are

    identified and finally the design is produced.So the purpose of OO analysis and design can describe as: Identifying the objects of a system. Identify their relationships. Make a design which can be converted to executables using OO languages.

    There are three basic steps where the OO concepts are applied and implemented. The stepscan be defined as

    Object - Oriented View:The object oriented approach to software development is decidedly simple. Because, it has

    most contemporary languages, operating systems and tools are object-oriented in samefashion. Object-oriented development provides the conceptual foundation for assemblingsystems out of components using technology such as java beans. Visualizing, specifying,constructing and documenting object-oriented systems are exactly the purposes of theUML.

    OO Analysis OO DesignOO Implementation

    with OO languages

  • 8/10/2019 2 OOSE Modeling with UML.pdf

    4/6

    Object Oriented Software Engineering Notes

    K S V Krishna Srikanth, Dept of IT, ANITS Page 14

    During object oriented analysis the most important purpose is to identify objects and

    describing them in a proper way. If these objects are identified efficiently then the next job

    of design is easy. The objects should be identified with responsibilities. Responsibilities are

    the functions performed by the object. Each and every object has some type ofresponsibilities to be performed. When these responsibilities are collaborated the purpose

    of the system is fulfilled.

    The second phase is object oriented design. During this phase emphasis is given upon the

    requirements and their fulfillment. In this stage the objects are collaborated according totheir intended association. After the association is complete the design is also complete.

    The third phase is object oriented implementation. In this phase the design is implemented

    using object oriented languages like Java, C++ etc.

    UML is a standard language for modeling software systems Serves as a bridge between the requirements specification and the implementation. Provides a means to specify and document the design of a software system.

    is process and programming language independent. is particularly suited to object-oriented program development.

    NOTATIONSClasses: A classis a description of a set of objects that share the same attributes, operations,relationships and semantics.

    Collaboration & Use CaseCollaboration defines an interaction, i.e., a society of roles and other elements that worktogether to provide some cooperative behavior.

    A use caseis a description of a set of sequence of actions that a system performs that yieldsan observable result.

    Component & NodeA component is a physical and replaceable part of a system that conforms to and providesthe realization of a set of interfaces.

  • 8/10/2019 2 OOSE Modeling with UML.pdf

    5/6

    Object Oriented Software Engineering Notes

    K S V Krishna Srikanth, Dept of IT, ANITS Page 15

    A node is a physical element that exists at run time and represents a computational

    resource.

    Behavioral Things: Messages & StatesAn interaction is a behavior that comprises a set of messages exchanged among a set ofobjects within a particular context to accomplish a specific purpose.

    A state machine is a behavior that specifies the sequence of states an object or aninteraction goes through during its lifetime in response to events.

    AnnotationA note is a symbol for rendering constraints and comments attached to an element or acollection of elements.

    RelationshipsA dependencyis a semantic relationship between two things in which a change to one mayaffect the semantics of the other.

    An association is a structural relationship that describes a set of links, a link being aconnection among objects.

    A generalization is a specialization/generalization relationship is which objects of thespecialized element (child) are substitutable for objects of the generalized element (parent).

  • 8/10/2019 2 OOSE Modeling with UML.pdf

    6/6

    Object Oriented Software Engineering Notes

    K S V Krishna Srikanth, Dept of IT, ANITS Page 16

    A realizationis a semantic relationship between classifiers, wherein one classifier specifies acontract that another classifier guarantees to carry out.

    Diagrams in UML

    A diagram is the graphical representation of a set of elements, usually rendered as aconnected graph of vertices (things) and arcs (relationships). Class diagram shows a set of classes, interfaces, and collaborations with their

    relationships. Object diagramshows a set of objects and their relationships. Use case diagram shows a set of use cases and actors (a special kind of class) and

    their relationships. Interaction diagram shows an interaction, consisting of a set of objects and the

    relationships, including the messages that may be dispatched among them. A sequence diagramemphasizes the time ordering. A collaboration diagram emphasizes the structural organization of the

    objects that send and receive messages. State chart diagramshows a state machine consisting of states, transitions, events,

    and activities. Activity diagramis a state chart diagram that shows the flow from activity to activity

    within a system. Component diagram shows the organization and dependencies among a set of

    components. Deployment diagram shows the configuration of processing nodes and the

    components that live on them.