2 Outline UML Object Oriented Concepts What is UMLUML HistoryWhy UMLUML Diagrams and Work ProductsObject Oriented ConceptsVisual Paradigm for UML – As UML tool
3 What is UML?UML enables system developers to specify, visualize, and document models in a manner that supports scalability, security, and robust execution.Because UML modeling raises the level of abstraction throughout the analysis and design process, it is easier to identify patterns of behavior and thus define opportunities for refactoring and reuseUML models can be precise enough to generate code or even the entire application
4 What is UML?UML modeling facilitates the creation of modular designs resulting in components and component libraries that expedite development and help insure consistency across systems and implementations.Automated test suites can verify the accuracy of the model. When coupled with tools to compile the UML model, the model can even be executed before any code exists
5 What is UML?Unified: It represents the evolutionary unification of Grady Booch, James Rumbaugh, and Ivar Jacobson experience with other industry engineering best practices.Modeling: it focuses on how we understand the world around usLanguage: it provides a best-of-breed mechanism for capturing, communicating, and leveraging problem-solving artifacts.
6 UML History1970s: number of methods were developed to exploit the new object-oriented (OO) programming conceptsModels Vs. Codeslegs on a three-legged stoolObject-Oriented Software Engineering (OOSE), developed by Ivar JacobsonJames Rumbaugh developed the Object-Modeling Technique (OMT)The Booch method, developed by Grady BoochOctober 1994: Grady Booch and Jim Rumbaugh, working at Rational Software Corp.1995: first UML (0.8)Objectory Company joined Rational Software Corp.1996: UML 0.9 and 0.9.11997: UML 1.0 and 1.1Then: 1.3, 1.4, and 2.0
7 Why UML Communication, general-purpose, broadly applicable, tool-supported,and industry standardized.UML knowledge can be applied toimprove value by increasing quality, reducing costs, and reducing time-to market while managing risks and being proactive to ever-increasing change and complexity.
8 UML Diagrams and Work Products Model Management diagrams include Packages, which are used to represent Subsystems, Models, and more.Structural diagrams include the Class diagram, Object diagram, Composite Structure diagram, Component diagram, Deployment diagram, and the Combined Component and Deployment diagram.Behavioral diagrams include the Use Case diagram, Activity diagram, Interaction diagramsEach diagram reveals a unique yet overlapping view of a system
10 Object Oriented Concepts Object orientation is so called because this method sees things that are parts of the real world as objects.Anything that you can describe can be represented as an object, and that representation can be created, manipulated, and destroyed to represent how you use the real object that it models.
11 ObjectDefinition: An object is a software bundle of variables and related methods.bicyclebicycle instancesoftware object that modeled your real-world bicycle
12 Class One cow makes moo- many cows make moolah. Definition: A class is a blueprint, or prototype, that defines the variables and the methods common to all objects of a certain kind.
14 EncapsulationEncapsulation is a way to organize the many types of information and behavior so that objects can be used as efficiently and effectively as possible.Encapsulation states that when designing an object we should separate what we know about the object according to two concepts:The minimum information needed to use the object.The information required to make the object work properly.
16 Encapsulation To use an object: we need interface To make the object work properly: we need to provide the mechanisms that respond to the interface (behaviors, data that describes the object's structure and object's current state)Purposeobjects with same interface should have different purposes
17 Applying encapsulation Encapsulation of an object requires us to exposeIts purpose, so you can select the proper object for the application you have in mind.Its interfaces, so you know how to use the object.Encapsulation of an object requires us to hide.The implementation that provides the behavior requested through the interfaces.The data within the object that defines the structure that supports its behavior.The data within the object that tracks the state of the object, its condition at any given point in time.
18 Defining associations and links A link is a relationship between two objects. An association is a relationship between two classes.Associations (and links) take on three different forms:AssociationAggregationComposition
19 AssociationThe simplest form, association, is a peer-to-peer relationship.
20 Aggregation Special type of association Indicates that the participating objects are not just independent objects that know about each other. Instead, they are assembled or configured together to create a new, more complex object.
21 CompositionComposition is used for aggregations in which the life span of the part depends on the life span of the aggregate object
22 InheritanceWe use the generalization process to create generalizations routinely to organize large amounts of information
23 Polymorphism "poly“ means many and "morph" means shape Polymorphism is based on polymorphic methods.A polymorphic method behaves differently, depending on the object type it is called with.On the outside, all calls to a polymorphic method look identical.The method identifies by itself the type of the object and behaves accordingly
24 PolymorphismGeneralization is one way to accomplish polymorphism. Another way is to define a special kind of abstract class called an interface class
25 Measuring QualityOO concepts alone do not ensure a quality object-oriented model.Cohesion and coupling are two common principles which are used to measure the quality of Object oriented model
26 CohesionCohesion is a measure of how well the parts of an object support the same purposeCohesion measures two factors:how well-defined the purpose of the object iswhether every part of the object contributes directly to fulfilling the purpose.
27 CouplingCoupling is a measure of the degree of dependency between objects