Object Oriented Analysis and Design Using the UMLObjectives: Introduction to Object OrientationIntroduction to Object Orientation Topics1. Basic Principles of Object OrientationWhat is Abstraction?What is Encapsulation?What is Modularity?What is Hierarchy?Slide 92. Basic Concepts of Object OrientationA More Formal DefinitionRepresenting ObjectsBasic Concepts of Object OrientationWhat is a Class?Representing ClassesClass CompartmentsThe Relationship Between Classes and ObjectsSlide 18What is an Attribute?Slide 20What is an Operation?Slide 22What is Polymorphism?What is an Interface?Interface RepresentationsSlide 26What is a Component?Slide 28What is a Package?Slide 30What is a Subsystem?Subsystems and ComponentsSlide 33Relationships Relationships: AssociationRelationships: AggregationRelationships: CompositionAssociation: Multiplicity and NavigationAssociation: MultiplicityExample: Multiplicity and Navigation Relationships: Dependency Relationships: GeneralizationExample: Single InheritanceExample: Multiple InheritanceWhat Gets Inherited?Example: What Gets InheritedRelationships: RealizationSlide 494. StereotypesNotesTagged ValuesConstraintsReview: Introduction to Object OrientationReview: Introduction to Object Orientation (cont.)OOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved1Object Oriented Analysis and Design Using the UMLIntroduction to Object OrientationOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved2Objectives: Introduction to Object OrientationUnderstand the basic principles of object orientation Understand the basic concepts and terms of object orientation and the associated UML notationAppreciate the strengths of object orientation Understand some basic UML modeling mechanismsOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved3Introduction to Object Orientation Topics1. Basic Principles of Object Orientation2. Basic Concepts of Object Orientation3. Strengths of Object Orientation4. General UML Modeling MechanismsOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved4Object OrientationEncapsulationAbstractionHierarchyModularity1. Basic Principles of Object OrientationOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved5SalespersonNot saying which salesperson – just a salesperson in general!!!CustomerProductManages ComplexityWhat is Abstraction?OOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved6Improves ResiliencyWhat is Encapsulation?Hide implementation from clientsClients depend on interface – only!Clients do not need to know ‘how’ the server operates or provides the services!How does an object encapsulate?What does it encapsulate?DISCUSS!!!!!OOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved7Order Processing SystemBillingOrderEntryOrderFulfillmentManages ComplexityWhat is Modularity?The breaking up of something complex into manageable piecesOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved8Decreasing abstractionIncreasing abstractionAssetRealEstateSavingsBankAccountCheckingStockSecurityBondElements at the same level of the hierarchy should be at the same level of abstractionWhat is Hierarchy? Levels of abstractionOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved9Introduction to Object Orientation TopicsBasic Principles of Object OrientationBasic Concepts of Object OrientationStrengths of Object OrientationGeneral UML Modeling MechanismsOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved102. Basic Concepts of Object OrientationObjectClassAttributeOperationInterface (Polymorphism)ComponentPackageSubsystemRelationshipsOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved11A More Formal Definition An object is a concept, abstraction, or thing with sharp boundaries and meaning for an application An object is something that has:StateBehaviorIdentityOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved12: ProfessorProfessor Clarka + b = 10ProfessorClark : ProfessorProfessorClarkClass Name OnlyObject Name OnlyClass and Object Name(stay tuned for classes)Representing ObjectsAn object is represented as rectangles with underlined namesOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved13Basic Concepts of Object OrientationObjectClassAttributeOperationInterface (Polymorphism)ComponentPackageSubsystemRelationshipsOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved14OO Principle: AbstractionWhat is a Class?A class is a description of a group of objects with common properties (attributes), behavior (operations), relationships, and semanticsA class is an ‘abstraction’ of objects….An object is an instance of a classA class is an abstraction in that it:Emphasizes relevant characteristicsSuppresses other characteristicsOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved15ProfessorProfessor Clarka + b = 10Representing ClassesA class is represented using a compartmented rectangleOOAD Using the UML - Introduction to Object Orientation, v 4.2Copyright 1998-1999 Rational Software, all rights reserved16ProfessornameempIDcreate( )save( )delete( )change( )Class NameAttributesOperationsClass CompartmentsA class is comprised of three sectionsThe first section contains the class nameThe second section shows the structure (attributes)The third section shows the behavior (operations)OOAD Using the UML - Introduction to Object
View Full Document