Object-Oriented Analysis and Design (OOAD)

85

description

Object-Oriented Analysis and Design (OOAD). Presented By Zubair Azmat Omer bin Asad M. Daniyal Shafiq. Object-Orientation?. What is Object-Orientation & Object-Oriented (OO) Methods? (C++, Java,Oracle??) What is OO methods used for? What are the features of OO methods? - PowerPoint PPT Presentation

Transcript of Object-Oriented Analysis and Design (OOAD)

Page 1: Object-Oriented Analysis and Design (OOAD)
Page 2: Object-Oriented Analysis and Design (OOAD)

What is Object-Orientation & Object-Oriented (OO) Methods? (C++, Java,Oracle??)

What is OO methods used for? What are the features of OO methods? How are they different from SSADM?

Page 3: Object-Oriented Analysis and Design (OOAD)

A technique for system modeling A technique to manage complexity inherent in

analysis, design, and implementation For the analysis and design of system Provide integrated view of hardware and

software Provide a methodology for system development

Page 4: Object-Oriented Analysis and Design (OOAD)

A system which is designed and modeled using an object-oriented technology is:

Easy to understand Directly related to reality Natural partitioning of the problem More flexible and resilient to change Systems can be developed more rapidly and at a

lower cost

Page 5: Object-Oriented Analysis and Design (OOAD)

Understanding of system is enhanced, as the semantic gap is reduced

Modification to the model tend to be local as they often result from an individual item, which is represented by a single object Ideally suited to model real systems, and simulating systems

Page 6: Object-Oriented Analysis and Design (OOAD)

Object technology is key to re-engineering business process at Xerox

Space telescope uses OO technology and Booch Method to build interface to Hubble

Database British Airways choose OO tools for airline

applications

Page 7: Object-Oriented Analysis and Design (OOAD)

Jacobson Use Case - Jacobson Unified Modelling Language (UML) Object-Oriented Design (OOD) - Booch (1983), Object-Oriented System Analysis (OOSA) – Object-Oriented Analysis (OOA) – Coad

&Yourdon (1991) Object Modelling Technique (OMT) – Hierarchical Object-Oriented Design (HOOD) - ESA (1989), architectural design

Page 8: Object-Oriented Analysis and Design (OOAD)

Attach the behavior and information that is important to objects

Associate relations between object to describe the static and dynamic organization and structure of real situation

Page 9: Object-Oriented Analysis and Design (OOAD)

Objects Classes Relationships An Instance Idea of encapsulation

Page 10: Object-Oriented Analysis and Design (OOAD)

Some concept of reality A physical entity It is characterized by: a number of operations, a state which remembers the effect of these

operations

Page 11: Object-Oriented Analysis and Design (OOAD)

Operations:• Work• Dance• Drive• Jump

Attributes:• Height• Eye color• Hair color• Weight

Page 12: Object-Oriented Analysis and Design (OOAD)

Static: relations existing over a long time objects know about each other existence Dynamic: relations which two objects communicate with

each other object sending stimuli to other stimuli - events, messages

Page 13: Object-Oriented Analysis and Design (OOAD)

Composition - structure object from Parts Partition - into hierarchy (‘is a’) Consist of - build objects from others Aggregate - to join together (‘has a’)

Page 14: Object-Oriented Analysis and Design (OOAD)

A concept of ‘Self-containing’ Information hiding - ‘internal’ structure is

hidden from their surroundings Behavior and information is represented or

implemented internally Functionality and behavior characterized by

‘interfacing’ operations

Page 15: Object-Oriented Analysis and Design (OOAD)

A class represents a template for several objects and describes how these objects are structured internally Objects of the same class have the same definition both for their operations and their information structure Class is an implementation of objects

Page 16: Object-Oriented Analysis and Design (OOAD)

An instance is an object created from a Class A class describes the behavior and information

structure of an instance, while the current state of the instance is defined by the operations performed on the Instance

System’s behavior is performed via the interactions between instances

Page 17: Object-Oriented Analysis and Design (OOAD)

Polymorphism – same object has different implementations

Inheritance – to adopt, permutated, and derive from some generic objects

Page 18: Object-Oriented Analysis and Design (OOAD)

A concept in type theory A common name may denote instances of different classes One type of operation can be implemented in different ways by different classes Overloading in modern OO language

Page 19: Object-Oriented Analysis and Design (OOAD)

A very strong tool for allowing system designers to develop flexible systems Designer only need to specify what shall occur and not how it shall occur To add an object, the modification will only affect the new object, not those using it

Page 20: Object-Oriented Analysis and Design (OOAD)

“If class B inherits class A, then both operations and the information structure described in class

A will become part of class B”

Page 21: Object-Oriented Analysis and Design (OOAD)

Show similarities Reuse common descriptions ‘Software Reuse’ Easy modification of model by performing modification in one place Avoid redundancy, leading to smaller and more efficient model, easier to understand

Page 22: Object-Oriented Analysis and Design (OOAD)

Treat data and function separately – function/data oriented method

More suited to classical hardware More difficult to maintain and re-configure Method require more abstraction - not too

Natural Large semantic gap between external and

internal view of a system

Page 23: Object-Oriented Analysis and Design (OOAD)

Advocate integral objects which encapsulate both function and data

Main activities include:• Identification of objects, and• Analyzing their behavior and information

Uses object-oriented techniques and ideas:• Inheritance• Polymorphism• Function/data abstraction

Page 24: Object-Oriented Analysis and Design (OOAD)

1. Finding objects2. Organizing objects3. Describing how objects interacts4. Defining the operations of objects5. Defining objects internally

Page 25: Object-Oriented Analysis and Design (OOAD)

Naturally occurring entities – physical A concept of some abstract ideas – conceptual Should be stable Classes of objects active/passive temporary/permanent/persistent part/whole generic/specific private/public

Page 26: Object-Oriented Analysis and Design (OOAD)

The objects found are to be implemented Once objects for a system are identified, they

are refined, organized and related Classes that define the implementation are

structured and consolidated Classes are refined with implementation details

(e.g. OS, language, hardware, etc.) Classes are coded

Page 27: Object-Oriented Analysis and Design (OOAD)

Identify how objects fit into a system Use of scenarios - unique situations Objects’ communication Objects’ interfaces Refined relationships

Page 28: Object-Oriented Analysis and Design (OOAD)

Operations performed by an object Behavior of an object Specification of interfaces, external and internal

functions Objects with complex functionality should be

partitioned into simpler objects

Page 29: Object-Oriented Analysis and Design (OOAD)

The specification of CLASSES Define information that an object encapsulates - ATTRIBUTES and METHODS

Page 30: Object-Oriented Analysis and Design (OOAD)

METHODS: Specify external functions Specify internal functions that are not seen or

usable by others objects Languages: C++, Smalltalk, Adam, Eiffel, Modula-2, Simulate, Java++

Page 31: Object-Oriented Analysis and Design (OOAD)

Reduce semantic gap between domain(the actual) and model (the design)

Closer to reality e.g. classification of objects close to how human understand surroundings

Easier to understand and maintain Easier to modify (e.g. polymorphism)

Page 32: Object-Oriented Analysis and Design (OOAD)
Page 33: Object-Oriented Analysis and Design (OOAD)

Inheritance Models Object Aggregation Models Object Behaviour Modelling

Page 34: Object-Oriented Analysis and Design (OOAD)

Objects are organized in a taxonomy Taxonomy; classification scheme showing the

relation of one object to the other, in terms of common attributes and services.

Concept of Super and Sub Classes.

Note: In UML inheritance is 'upwards' in contrast to 'downwards'.

Page 35: Object-Oriented Analysis and Design (OOAD)
Page 36: Object-Oriented Analysis and Design (OOAD)

A composition in which the "whole" subsumes and conceals its constituent "parts".

A composition that encapsulates (hides) the parts of the composition.

"Parts" do not exist in autonomy(are not visible externally)

Page 37: Object-Oriented Analysis and Design (OOAD)
Page 38: Object-Oriented Analysis and Design (OOAD)

Modelling the interaction of objects Modelling behaviours using senarios (UML Use Cases) and Sequence

Diagrams.

Page 39: Object-Oriented Analysis and Design (OOAD)

Its an interaction diagram in UML, that shows how processes operate one with another and in what order.

Sequence diagrams are sometimes called Event-trace diagrams, event scenarios, and timing diagrams.

Page 40: Object-Oriented Analysis and Design (OOAD)
Page 41: Object-Oriented Analysis and Design (OOAD)

Usage Case is simply a reason to use a system. Three key things:

1. The actor or actors involved. An actor is a type of user (for example, cardholder) that interacts with the system.

2. The system being used.3. The functional goal that the actor achieves using the system . the

reason for using the system.

Page 42: Object-Oriented Analysis and Design (OOAD)

The set of all possible outcomes of the interaction between the actor and system to achieve a goal.

Note: An actor is an external entity to the system (may or may not be a Human.

Page 43: Object-Oriented Analysis and Design (OOAD)
Page 44: Object-Oriented Analysis and Design (OOAD)

User Interface Storyboards are a step further to the logical design. UI Designs show how it might look with a real UI Implementation. This is done after the key Use Scenarios are finalized.

Note: UI Design’s purpose is to enhance user involvement in earlier stages of the ISD cycle.

Page 45: Object-Oriented Analysis and Design (OOAD)

Uses: The Uses relationship extracts similarities (i.e., common flow of events)

from use cases and abstracts them into another use case. For example, in a system, several use cases may share the login validation sequence of actions. The verification is abstracted into a use case that is the target of a "uses" connection from the concrete use cases.

Page 46: Object-Oriented Analysis and Design (OOAD)

Extends: The extends relationship allows the modeling of complex interactions

by extending previous use cases to document variations. The original use case is left complete and intact. Changing or removing the "extended" use case has no effect on the base use case. An example is statistics collection for this product. The action of an end-user interacting with the system to view the methodology is documented in a use case, the View Methodology use case. The statistics collection is modeled as a use case that extends the View Methodology use case.

Page 47: Object-Oriented Analysis and Design (OOAD)

UML has Special Notation for Use Cases:

Actors: Represented as a Stick menUse Case: Drawn as an Oval, with the name inside the oval.Line is drawn to show the communication of the actor and the use case.System boundary is drawn, keeping the actor outside the boundary (the actor is always outside the boundary.

Page 48: Object-Oriented Analysis and Design (OOAD)
Page 49: Object-Oriented Analysis and Design (OOAD)

An OO Methodology that emphasizes on the identification of objects – requirement analysis

Based on 3 techniques: Conceptual Modeling Object Oriented Programming Use Case

Page 50: Object-Oriented Analysis and Design (OOAD)

Ivar Jacobson's Object-Oriented Software Engineering (OOSE) is one of the precursors to the more modern Unified Modeling Language (UML). OOSE includes a: Requirements Model Analysis Model Design Model Implementation Model Testing Model

Page 51: Object-Oriented Analysis and Design (OOAD)
Page 52: Object-Oriented Analysis and Design (OOAD)

The Jacobson requirements model includes a problem domain object diagram and use case diagrams. This model defines the limits and functionality of a system.

Jacobson's Problem Domain Object Diagram The problem domain object diagram provides a logical view of the

system, which is used to specify the use cases for use case diagrams.

Page 53: Object-Oriented Analysis and Design (OOAD)

Jacobson's Use Case Diagrams Use case diagrams illustrate how the outside world interacts with

elements of the application system.

Page 54: Object-Oriented Analysis and Design (OOAD)

Capture the functional and non-functional requirements. Formalize the requirement. Identify and Document essential system entities. Identify and Document essential system behaviors.

Page 55: Object-Oriented Analysis and Design (OOAD)
Page 56: Object-Oriented Analysis and Design (OOAD)

Structure a system independently to the actual implementation Capture information, behavior and presentation Specify objects

Page 57: Object-Oriented Analysis and Design (OOAD)

Refine the object structure to the chosen implementation environment.

Objects are consolidated into BLOCKS – abstracted classes. Blocks interactions are also documented using Interaction Diagrams.

Page 58: Object-Oriented Analysis and Design (OOAD)

The blocks in the design model are implemented using classes. Class diagrams are used to express relationships between classes.

Page 59: Object-Oriented Analysis and Design (OOAD)

States the method and result of testing. Test specifications describe how classes and system is to be tested. Test results document outcome of the tests executed. Verification and Validation

Page 60: Object-Oriented Analysis and Design (OOAD)

Requirement Analysis Functional Analysis and Design

Page 61: Object-Oriented Analysis and Design (OOAD)

Generate requirement model with actors, and use cases identified STEP 1: System context diagram STEP 2: Identify principal actors STEP 3: Construct Use Cases STEP 4: Represent actors and Use Cases with a Use Case Diagram

Page 62: Object-Oriented Analysis and Design (OOAD)

Structure system functionality into objects To distribute the behavior of the use cases among objects – analysis

model Create objects that are common to actors or use cases. Identify the responsibilities of objects. Identify the relationships between objects.

Page 63: Object-Oriented Analysis and Design (OOAD)

STEP 1: Identify scenarios from use cases. STEP 2: Associate actors and use cases to scenarios STEP 3: Produce event lists for scenarios STEP 4: Identify Primary object types. STEP 5: Consolidate objects into control, entity and interface. STEP 6: Identify and represent relationships.

Page 64: Object-Oriented Analysis and Design (OOAD)
Page 65: Object-Oriented Analysis and Design (OOAD)

Standardized general purpose modeling language

UML includes a set of graphical notation techniques

Graphical language for visualizing, specifying and constructing system elements

UML is not a development method by itself designed to be compatible with the leading

object-oriented methods of its time new methods have been created based on UML Best Example RUP(Rational Unified Process)

Page 66: Object-Oriented Analysis and Design (OOAD)

Unified Method 0.8

UML 0.9

UML 1.0

UML 1.1

UML 1.3

Other Methods

Booch Method OMTOOSE(Jacobson)

OMG Acceptance, Nov 1997

Final Submission to OMG, Sep ‘97

First submission to OMG, Jan ‘97

Page 67: Object-Oriented Analysis and Design (OOAD)

Functionality

Cost

Capacity

Availability

PerformanceTechnology

Resilience

Compatibility

“The Challenge over the next 20 years will not be speed or cost or performance; it will be a question of complexity”

Bill Raduchell, Chief Strategy Officer, Sun Microsystems

“Our enemy is complexity, and it’s our goal to kill it” Jan Baan

Page 68: Object-Oriented Analysis and Design (OOAD)

Sequence Diagrams

Collaboration Diagrams

Statechart Diagrams

Activity DiagramsDeployment Diagrams

Component Diagrams

Object Diagrams

Class Diagrams

Use Case Diagrams

UML

Page 69: Object-Oriented Analysis and Design (OOAD)

“A Use Case Diagram depicts actions by people and systems outside your system, along with what your system does in response. It’s useful for depicting the functional requirements of your system. ”

Page 70: Object-Oriented Analysis and Design (OOAD)

1- What does the KMS do when the care giver checks a pet in?

2- What does the KMS do when the care giver checks a pet out?

3- What action or actions by the care giver will cause the KMS to

update a kennel assignment?

4- What action or actions by the Care Giver will involve the

Veterinarian?

Page 71: Object-Oriented Analysis and Design (OOAD)

“An Activity Diagram depicts the detailed behavior inside a single functional requirement, including a primary scenario and a number of alternate scenarios. It’s useful for ensuring that you thoroughly understand a given functionality.”

Page 72: Object-Oriented Analysis and Design (OOAD)

1- What is the sequence of steps the system performs when assigning a pen to a pet that has visited previously?

2- What additional steps are performed for a pet that is new to the kennel?

Page 73: Object-Oriented Analysis and Design (OOAD)

“A Component Diagram depicts the deployable units of your system—executables, components, data stores, among others—and the interfaces through which they interact. It’s useful for exploring the architecture of your system. ”

Page 74: Object-Oriented Analysis and Design (OOAD)

1- The Care Giver Center is the Web page that the care giver uses to enter information about a pet. What interface does it use to provide data to the KMS?

2- What other components provide data to the KMS, and through what interfaces?

3- What types of contacts can be made through the Comm Center component?

Page 75: Object-Oriented Analysis and Design (OOAD)

“A Class Diagram depicts the classes and interfaces within the design of your system, as well as the relations between them. It’s useful for defining the internal, Object-Oriented structure of your code.”

Page 76: Object-Oriented Analysis and Design (OOAD)

1- What three classes are associated with the Kennel Assignment class?

2- What operations can objects of the Kennel Assignment class perform?

3- What attributes describe an object of the Pet Record class?

4- What attributes describe an object of the Kennel Space class?

Page 77: Object-Oriented Analysis and Design (OOAD)

“A Statechart Diagram depicts how the state of your system changes in response to internal and external events. It’s useful for ensuring that each event is handled properly no matter what state your system may be in.”

Page 78: Object-Oriented Analysis and Design (OOAD)

1- What event causes a kennel space, or pen, to enter the Defined state?

2- What events (from which states) cause a pen to enter the Available state?

3- What state does a pen enter when it’s currently in the Available state, and a Dismantled event occurs?

4- How can a pen go from the In Use state to the Deconstructed state?

Page 79: Object-Oriented Analysis and Design (OOAD)

“A Deployment Diagram depicts how the deployable units of your system—applications, components, data stores, etc.—are assigned to various nodes, as well as how the nodes communicate with each other and with devices. It’s useful both as a map of your system and as a means for studying the load across your system.”

Page 80: Object-Oriented Analysis and Design (OOAD)

1- How is the KMS server connected to the telephone?

2- How does the owner’s PC access pet information on the KMS server?

3- How does information go from the care giver station to the reception station?

Page 81: Object-Oriented Analysis and Design (OOAD)

“A Package Diagram depicts how related elements of your design are grouped together, as well as how the groups depend upon each other. It’s useful for dividing a complex design into multiple, more manageable smaller designs. ”

Page 82: Object-Oriented Analysis and Design (OOAD)

1- Which packages make use of information from the KMS Interfaces package?

2- Which packages does the KMS Central Classes package make use of?

Page 83: Object-Oriented Analysis and Design (OOAD)

UML is all about clear communication Certain drawbacks of UML like too many

infrequently and redundant constructs not only used with OO methods; RUP UML 2.0 major revision adopted by OMG 2005 OMG vision is that in near future all applications

will be written using only a modelling tool Models will compile directly to machine

language

Page 84: Object-Oriented Analysis and Design (OOAD)

http://www.soi.wide.ad.jp/class/20010030/slides/05/index_38.html

http://www.dbmsmag.com/9606d15.html http://en.wikipedia.org/wiki/Object-

oriented_analysis_and_design http://www.dcs.bbk.ac.uk/~steve/1/

tsld004.htm http://www.imse.hku.hk/imse1013/pdf/ESA-

06%20OOAD.pdf http://www.devshed.com/c/a/Practices/

Introducing-UMLObjectOriented-Analysis-and-Design/2/

Page 85: Object-Oriented Analysis and Design (OOAD)