Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Object Orientation System Analysis and Design.

Similar presentations


Presentation on theme: "Introduction to Object Orientation System Analysis and Design."— Presentation transcript:

1 Introduction to Object Orientation System Analysis and Design

2 Objectives Understand the basic characteristics of object- oriented systems. Understand the basic characteristics of object- oriented systems. Understand the object orientation notation Understand the object orientation notation Understand how to analyze and design with OO paradigm Understand how to analyze and design with OO paradigm

3 Whats Object Orientation? A new technology based on objects and classes A new technology based on objects and classes A paradigm (way of thingking) to organize software as a collection of discrete objects that incorporate both data and process. A paradigm (way of thingking) to organize software as a collection of discrete objects that incorporate both data and process. An abstraction of the real world based on objects and their interactions with other objects. An abstraction of the real world based on objects and their interactions with other objects.

4 Basic Characteristic (1) Classes and Objects OO focus on capturing structure and behaviour in little modules that encompass both data and process. These modules are known as OBJECTs. OO focus on capturing structure and behaviour in little modules that encompass both data and process. These modules are known as OBJECTs. Class is a general template we use to define and create specific instances or objects. Class is a general template we use to define and create specific instances or objects. An object is an instantiation of a class. An object is an instantiation of a class. Each object has attributes (describe the object) and behaviors (what an object can do). Each object has attributes (describe the object) and behaviors (what an object can do).

5 Class Car Attributes Model Location #Wheels = 4 Operations Start Accelerate >

6 Basic Characteristic (2) (2) Methods and Messages Methods implement an objects behaviour Methods implement an objects behaviour In other languages, method is known as procedure or function. In other languages, method is known as procedure or function. A message is a function or procedure call from one object to another object. A message is a function or procedure call from one object to another object.

7 Basic Characteristic (3)

8 Basic Characteristic (4) (3) Encapsulation and Information Hiding Encapsulation : how to wrap process and data into a single entity. Encapsulation : how to wrap process and data into a single entity. Only the information required to use a software module is published to the user. Exactly how the module implements the required information is unnecessary. Only the information required to use a software module is published to the user. Exactly how the module implements the required information is unnecessary.

9 Basic Characteristic (5) (4) Inheritance Is a mechanism to create a class from other class. Is a mechanism to create a class from other class. Related terms : superclass and subclass Related terms : superclass and subclass Subclass inherit the appropriate attributes and methods from its superclass. Subclass inherit the appropriate attributes and methods from its superclass. Avoid repeating of writing attributes or methods. Avoid repeating of writing attributes or methods. The relationship between the class and its superclass is known as the A-Kind-Of relationship. The relationship between the class and its superclass is known as the A-Kind-Of relationship.

10 Basic Characteristic (6)

11 (5) Polymorphism and Dynamic Binding Polymorphism : the same message can be interpreted differently by different classes of objects. Polymorphism : the same message can be interpreted differently by different classes of objects. For example : sent message draw to an circle object, a square object, and a triangle object will make a different result. For example : sent message draw to an circle object, a square object, and a triangle object will make a different result. Dynamic Binding : determining the exact implementation of a request based on both the request (operation) name and the receiving object at run-time Dynamic Binding : determining the exact implementation of a request based on both the request (operation) name and the receiving object at run-time

12

13 Various Methodologies Shlaer/Mellor methods (Shlaer-1988) Shlaer/Mellor methods (Shlaer-1988) Coad/Yourdon methods (Coad-1991) Coad/Yourdon methods (Coad-1991) Booch methods (Booch-1991) Booch methods (Booch-1991) OMT methods (Rumbaugh-1991) OMT methods (Rumbaugh-1991) Wirfs-Brock methods (Wirfs-Brock-1990) Wirfs-Brock methods (Wirfs-Brock-1990) OOSE Objectory methods (Jacobson-1992) OOSE Objectory methods (Jacobson-1992) Unified Modelling Languages (UML-1997) Unified Modelling Languages (UML-1997)

14

15 OBJECT ORIENTED NOTATION GUIDE

16 Class and Object Class Class Instantiation relationship Instantiation relationship Object instance Object instance Class Name Attributes Methods Class name Attributes Methods Class Name

17 Generalization and Inheritance

18 Aggregation Aggregation 1 Aggregation 1 Aggregation 2 Aggregation 2

19 Association Association Association Multiplicity of association Multiplicity of association

20 Ternary Association

21 OBJECT ORIENTED ANALYSIS AND DESIGN

22 Analysis and Design Process 1. Problem statement 2. System architecture 3. Object modelling 1. Identifying object classes 2. Preparing a data dictionary for classes 3. Identifying association 4. Identifying attributes 5. Refining with inheritance 6. Grouping classes into model 4. Dynamic modelling 5. Functional modelling

23 PROBLEM STATEMENTS

24 Problem Statement Requirements statement Requirements statement Problem scope Problem scope Whats needed Whats needed Application context Application context Assumptions Assumptions Performance needs Performance needs

25 Example : ATM Network

26 System Architecture

27 Identifying Object Classes

28 Example : ATM Network

29 Preparing a Data Dictionary

30 Example Account : a single account in a bank against which transactions can be applied. Account may be of various types, at least checking or savings. A customer can hold more than one account. Account : a single account in a bank against which transactions can be applied. Account may be of various types, at least checking or savings. A customer can hold more than one account. Bank : A financial institution that holds accounts for customers and that issues cash cards authorizing access to accounts over the ATM network. Bank : A financial institution that holds accounts for customers and that issues cash cards authorizing access to accounts over the ATM network. ATM : … ATM : … Bank Computer : …. Bank Computer : …. Customer : … Customer : … etc etc

31 Identifying Associations

32 Example

33 Identifying Attributes

34 Example

35 Refining with Inheritance This step is to organize classes by using inheritance to share common structure This step is to organize classes by using inheritance to share common structure Inheritance can be added in two directions : Inheritance can be added in two directions : Bottom Up By generalizing common aspect of existing classes into a superclasses Bottom Up By generalizing common aspect of existing classes into a superclasses By searching for classes with similar attributes, associations, or operations By searching for classes with similar attributes, associations, or operations For each generalization, define a superclass to share common features For each generalization, define a superclass to share common features Top Down By refining existing classes into specialized subclasses Top Down By refining existing classes into specialized subclasses

36 Example

37 Grouping Class into Modules A module is a set of classes that captures some logical subset of entire model A module is a set of classes that captures some logical subset of entire model For example: a model of computer operating system might contain modules for process control, device control, file maintenance, and memory management For example: a model of computer operating system might contain modules for process control, device control, file maintenance, and memory management

38 Example Tellers : Cashier, Entry Station, Cashier Station, ATM Tellers : Cashier, Entry Station, Cashier Station, ATM Account: Account, Cash Card, Card Authorization, Customer, Transaction, Update, Cashier Transaction, Remote Transaction Account: Account, Cash Card, Card Authorization, Customer, Transaction, Update, Cashier Transaction, Remote Transaction Banks: Consortium, Bank Banks: Consortium, Bank

39 DYNAMIC MODEL

40 Dynamic Model The dynamic model shows the time-dependent behavior of the system and the objects in it. The dynamic model shows the time-dependent behavior of the system and the objects in it. Begin dynamic analysis by looking for event, externally visible stimuli and responses. Begin dynamic analysis by looking for event, externally visible stimuli and responses. The dynamic model is important for interactive systems, but insignificant for purely static data repository, such as database. The dynamic model is important for interactive systems, but insignificant for purely static data repository, such as database.

41 The following steps are performed in constructing a dynamic model : The following steps are performed in constructing a dynamic model : 1. Prepare scenarios of typical interaction sequences 2. Identify events between objects 3. Prepare an event trace for each scenario 4. Build a state diagram 5. Match events between objects to verify consistency

42 Example

43 FUNCTIONAL MODEL

44 Functional Model The functional model shows how values are computed, without regard for sequencing, decisions, or object structure The functional model shows how values are computed, without regard for sequencing, decisions, or object structure The functional model shows which values depend on which other values and the functions that relate them The functional model shows which values depend on which other values and the functions that relate them Data flow diagrams are useful for showing functional dependencies Data flow diagrams are useful for showing functional dependencies

45 Example

46 OBJECT ORIENTATION IMPLEMENTATION

47 Implementation Process Class Definition Class Definition Creating Objects Creating Objects Calling Operations Calling Operations Using Inheritance Using Inheritance Implementing Association Implementing Association


Download ppt "Introduction to Object Orientation System Analysis and Design."

Similar presentations


Ads by Google