Object Oriented Modeling

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Object Oriented Modeling:

Object Oriented Modeling

System modelling:

System modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different models present the system from different perspectives Structural perspective showing the system or data architecture; Behavioural perspective showing the behaviour of the system; External perspective showing the system’s context or environment.

Object Oriented Methodology:

Object Oriented Methodology Building a model of an application domain and then adding implementation details to it. Following four stages:- Analysis; System Design; Object Design; Implementation.

Three Models:

Three Models Object Model – describes the static structure of objects in the system and their relationships. Dynamic Model – describes the aspect of the system that change over time, i.e. interaction among objects. Functional Model – describes data value transformation in the system.

Object Model:

Object Model Describes the structure of objects in a system- - Identity - Relationship to other objects - Their attributes - And their operations.

Dynamic Model:

Dynamic Model Describes those aspects of the system concerned with time and sequencing of operations- Events that make change Sequence of events States that define context of events And organization of events and states.

Functional Model:

Functional Model Describes those aspects of the system concerned with transformation of values- Functions Mappings Constraints Functional dependencies Is represented with Data Flow Diagrams.

Object models and the UML:

Object models and the UML The UML is a standard representation devised by the developers of widely used object-oriented analysis and design methods. It has become an effective standard for object-oriented modelling.

Object Model Notations:

Object Model Notations Object classes are rectangles with the name at the top, attributes in the middle section and operations in the bottom section;

Object Model Notations (Contd.):

Object Model Notations (Contd.) Relationships between object classes (known as associations) are shown as lines linking objects

PowerPoint Presentation:

Connection between objects Solid line Direction optional Arrowhead depends on meaning Name (optional) Multiplicities (optional) Visibility (optional) Associations

Association Examples:

Association Examples Not UML

Attribute Elements:

Attribute Elements Visibility Name (only required element) Type Multiplicity Default value Properties Example: - name:String [1] = “Bob” {readOnly}

Attribute Types:

Attribute Types Instance attributes Each object of the class has its own attribute Changing the value of the attribute affects only the containing object Class attributes Only one instance of the attributes for all objects of the class Changing the value of the attribute affects all objects of the class Underline the attribute

Attribute Type Example:

Attribute Type Example

Library class hierarchy:

Library class hierarchy

User class hierarchy:

User class hierarchy

Multiple inheritance:

Multiple inheritance

Object aggregation:

Object aggregation An aggregation model shows how classes that are collections are composed of other classes. Aggregation models are similar to the part-of relationship in semantic data models.

Object aggregation:

Object aggregation

Generalization:

Generalization Models the concept of inheritance Subclasses inherit the attributes and operations of all their superclasses Objects of a subclass should be substitutable for objects of their superclasses Uses hollow triangle arrowhead on superclass

Generalization Example1:

Generalization Example1

Generalisation Example2:

Generalisation Example2

Constraints:

Constraints A restriction in the design Documented inside curly braces {} attached to any diagram element

Putting the Pieces Together:

Putting the Pieces Together

Abstract Classes:

Abstract Classes Used to hold common operations and data Used in inheritance hierarchy Derived (child) classes provide implementations Documented with class name in italics Can also use {abstract} property Shape {abstract} +move() +erase() : void {abstract} +draw() : void {abstract}

Object behaviour modelling:

Object behaviour modelling A behavioural model shows the interactions between objects to produce some particular system behaviour that is specified as a use-case. Sequence diagrams (or collaboration diagrams) in the UML are used to model interaction between objects.

Issue of electronic items:

Issue of electronic items

Weather Station Data Collection Sequence:

Weather Station Data Collection Sequence

Characteristics of OOD:

Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent and encapsulate state and representation information. System functionality is expressed in terms of object services

Characteristics of OOD (Contd.):

Characteristics of OOD (Contd.) Shared data areas are eliminated Objects communicate by message passing Objects may be distributed Objects may execute sequentially or in parallel

Advantages of OOD:

Advantages of OOD Easier maintenance. Objects may be understood as stand-alone entities Objects are appropriate reusable components For some systems, there may be an obvious mapping from real world entities to system objects