Slide 1UML OverviewUML OverviewUML and OO MethodologiesUML and OO MethodologiesUML and OO MethodologiesUML ElementsUML Elements – Structural ThingsUML Elements – Structural ThingsUML Elements – Other ThingsUML Elements – RelationshipsUML Elements – RelationshipsUML Elements – DiagramsUML - Extension MechanismsUML - Extension MechanismsUML - Extension MechanismsUML - Extension MechanismsUML - Extension MechanismsUML and ‘4+1 Views’Class DiagramClass DiagramClass Diagram - ExamplesClass Diagram - ExamplesClass Diagram - ExamplesClass Diagram - ExamplesObject DiagramObject Diagrams - ExamplesObject Diagrams - ExamplesComponent DiagramComponent Diagrams - ExamplesComponent Diagrams - ExamplesComponent Diagrams - ExamplesPackage DiagramPackage Diagrams - ExamplesPackage Diagrams - ExamplesDeployment DiagramDeployment Diagrams - ArtifactsDeployment Diagrams - NodesDeployment Diagrams - ExamplesDeployment Diagrams - ExamplesUML - DiagramsState Machine DiagramState Machine Diagrams -ElementsState Machine Diagrams -ExamplesState Machine Diagrams -ExamplesSequence DiagramSequence DiagramsSequence Diagrams - ElementsUML - DiagramsQuestions and AnswersAssignmentCS/SE 6362-501 – Object-Oriented Analysis and Design (OOA/D)The Unified Modeling LanguageEbenezer Oladimeji, [email protected] Overview A general purpose visual modeling language for specifying, visualizing, constructing, and documenting the artifacts of software systems. Created by Object Management Group (OMG)Established as a standardLanguage Specification at www.uml.org UML has a direct relation with object oriented analysis and design (OOAD) Based on formal specificationsMeta-modelMeta-meta model ExtensibleUML Overview GoalsA picture is worth more than a thousand wordsdefine some general purpose modeling language which all modelers can useIt should be simple to understand and use by stakeholders:-business users, -common people,-Anybody- interested in understanding a systemEstablish a standardUML and OO Methodologies Fundamentals of Object-orientationObjects: an entity and the basic building blockClass: the blue print of an objectAbstraction: represents the behavior of a real world entityEncapsulation: mechanism of binding data together and hiding them from outside world.Inheritance: mechanism of making new classes from existing onePolymorphism: mechanism for classes to exists in different formsUML and OO Methodologies Purpose of OOADIdentifying the objects of a system.Identify their relationships.Make a design which can be converted to executables using OO languages OOAD Approach:OO Analysis OO Design OO implementation using OO languages OO enables automation, e.g.:Code generationModel checkingUML and OO Methodologies OOAD Phases:OO Analysis:-Main purpose is to identify objects and describe them properly-objects are to be identified with responsibilities-Responsibilities are the functions performed by the object-When each and every object performs its responsibilities, the purpose of the system is fulfilled.OO Design:-emphasis is given to the requirements and their fulfilment.-Focus is on solution domain-Levels–High-Level design (aka Architecture)–Detailed DesignOO Implementation:-Design is implemented using object oriented programming languages like Java, C++, etc.UML Elements ThingsThe most important building blocks in UML-Structural-Behavioral-Grouping-Annotational Relationships:Another most important building blocks in UML-Dependencies-Association-Generalization-Realization-Aggregation/Composition DiagramsStatic modelsDynamic models.UML Elements – Structural Things ClassAn abstract template for building objects Interface:defines a set of operations which specify the responsibility of a class Collaborationdefines a set of operations which specify the responsibility of a classUML Elements – Structural Things Use Caserepresents a set of actions performed by a system for a specific goal. Component:describes physical part of a system Nodea physical element that exists at run timeUML Elements – Other Things Interaction (behavioral thing)a behavior consisting of a group of messages exchanged among elements to accomplish a specific task. State machine (behavioral thing)a behavior consisting of a group of messages exchanged among elements to accomplish a specific task. Package (grouping thing)Package is the only one grouping thing; for gathering structural and behavioral things. Note (annotational thing)to capture remarks, descriptions, and commentsUML Elements – Relationships Dependencya relationship between two things in which change in one element also affects the other. Associationa set of links that connects UML elements also describes how many objects are taking part in that relationship.. Generalizationa relationship which connects a specialized element with a generalized element. basically describes inheritance relationship RealizationConnects two elements in which one describes some responsibility which is not implemented and the other one implements them. This relationship exists in case of interfacesUML Elements – RelationshipsMultiplicity IndicatorUML Elements – DiagramsWe will focus on diagrams for design modelsUML - Extension Mechanisms While UML is very well-defined, there are situations in which it needs to be customized to specific problem domains UML extension mechanisms are used for:-adding new model elements, -creating new properties, -and specifying new semantics 3 major extension MechanismStereotypesTagged valuesConstraintsUML - Extension Mechanisms StereotypesStereotypes are used to extend UML to create new model elements that can be used in specific domainsE.g. when modeling an elevator control system, we may need to represent some classes, states etc. as -«hardware»-«software»Stereotypes should always be applied in a consistent way«button»CancelButtonStereotypestateUML - Extension Mechanisms Tagged ValuesDefine additional properties for any kind of model elementsCan be defined for existing model elements and for stereotypesAre shown as a tag-value pair where the tag represent the property and the value represent the value of the property•Tagged values can be useful for adding properties about-code generation-version control-configuration management-authorship-etc.UML -
View Full Document