Object Oriented Analysis and Design : OOAD - PowerPoint PPT Presentation

1 / 53
About This Presentation
Title:

Object Oriented Analysis and Design : OOAD

Description:

Object Oriented Analysis and Design: OOAD Seree Chinodom Object Oriented Analysis and Design:OOAD ... – PowerPoint PPT presentation

Number of Views:2562
Avg rating:3.0/5.0
Slides: 54
Provided by: Supar
Category:

less

Transcript and Presenter's Notes

Title: Object Oriented Analysis and Design : OOAD


1
Object Oriented Analysis and Design OOAD
  • Seree Chinodom

2
Object Oriented Analysis and DesignOOAD
  • ???????????????????????????????????
    ??????????????????????????? (process)
    ???????????? (Notation) ????????????????????????
    ?????????????? ???????????????????????????????
    (Object) ?????????????????????? (Attribute)
    ?????????????????? (Operation) ??????????  
  • ??????????????????????????????????????????????????
    ??????????? ????????????????????????????????????
    ????? ???????????????????????? ???????????????????
    ? (Model) ???????????? (Notation)
    ?????????????????????????????????

3
?????????????? OOAD
  • Object Oriented Software Engineering OOSE ???
    Jacobson
  • Object Modeling Technique OMT ??? Rumbaugh
  • OO analysis and design ??? Coad ??? Yourdon
  • ???????????? ????????????????????????????????
    ??????????????????????????????????????????????????
    ???
  • ??????? Phase ???????????????????????????????????
    ??????????????????

4
??????????????????????????????????
  • ????????????????? 3 ??? ???
  • Functional Model
  • Object Model
  • Dynamic Model

5
1. Functional Model
  • ?????????????????????????????????????????????????
  • ?????????????????????????????? ??????????
  • ??????????????????????????????????????????????????
    ?????????????????????????????????
    ??????????????????????? ?????????  ????
    ?????????????????????????????? ??????????????????
    ????????????????????????????  ????????????????????
    ????????   ?????????????????????????????????
    ??????????????????????? ?????????????????????
    ?????????????????????????????????

6
Functional Model (???)
  • ??????????????????????????????????????????????
    Use case diagram (Use Case Diagram)
  • Use case diagram ????????????????????????????????
    ??????????????????????????????????????????????????
    ????????? ?????????????????????? Phase ?????
    ????????????????????????????  

7
2. Object Model
  • ????????????????????????????????????????
    ????????????????????? (Class) ?????
    ???????????????????????????? ?????????????????????
    ???????? 
  • ?????????????????????????????????????????????Comp
    onent Diagram ??? Class Diagram
  • Component Diagram ????????????????????????????????
    ?component????? ?????????
  • Class Diagram ??????????????????????? (attribute)
    ??? ?????? (data) ???? ??????
    (variable),  ??????????????? (Operation) ????????
    (method) ????????? ???????????????????????????????
    ?????????
  •  

8
3. Dynamic Model
  • ?????????????????????????????????????????? object
    (Object) ????? ????????????????   (Message)
    ?????????????????? (Event) ????? ???????????
  • object ????????????????????????
    (Instance) ????????????????????????????????????
    object ????? ??????????? object ???????????
    ?????????????????????????????????
  • ??????????????????????????????????????????????????
    ???? object ????????? ????????????????????????
    ???? object ??????????????????????(State)
    ???????????????????????????? ????????????????????
    ???????????????????????? 

9
Dynamic Model (???)
  • ????????????????
  • Sequence Diagram
  • State Diagram

10
Sequence Diagram
  • ??????????????????????????????????????????????????
    ????????????????????????? ???????? object ?????
    ??????????????????????
  • ???????????????????Sequence diagram
    ??????????????????????????????????????????????????
    ?????????
  • Sequence diagram ?????????????????????????????????
    ??????????????????????????????????????????????????
    ???????????????

11
State Diagram
  • ??????????????????????????????????????????????????
    ??? ?????????????????????????????????
    ????????? object ???????? 

12
????????????????? (Software Development)
  • ??????????????????????????????? Phase ?????
    ???????? Software development life cycle model
  • ????????????????? Software development life cycle
    ???????????? ???? Waterfall model, Rapid
    prototyping model, Spiral model, Concurrent
    development model ??? Formal methods model

13
Waterfall model OOAD
  • Waterfall model ?????? Phase ???????????????
    5 Phase  ??? 
  • Definition Phase ?????????????????????
    ????????????
  • Analysis Phase ???????????????
  • Design Phase ????????????
  • Implement and testing Phase ???????????????????
    ??  
  • Maintenance Phase ????????????????

14
Waterfall model
15
Phase 1  ?????????????????????????)
  • ???? Phase ?????????????? ????????????????????????
    ???????????????? ??????? 
  • ???????????????????????
  • ???????????????????????????????
  • ???????????????????????????????????????
  • ??????????????????????????????????????????????????
    ????????????????????????????? 
  • ????? Phase ??????????????????????????????????????
    ? ??????????? Phase ????????????????????????
  • ????????????????????????????????? ??? Use Case
    Diagram  ????????????????????? (Data Dictionary)

16
Use Case Diagram
  • Use case diagram??????????????????? ????????
    (Ivar Jacobson) ???? OMG ?????????????????????
    UML ????   ????????????????????
    ??????????????????????????????
  • Use case diagram ?????????????????????????????????
    ??????????????????????????????????????????????????
    ????????????????????????????????????????????????? 
     
  • Use case diagram ?????????????????????????????????
    ? Phase ????? ???????????????

17
????????????????????? Use Case Diagram
  • Actor ???????????????????????????????????????????
    ??  ???????????????????????????
    ????????????????
  • Actor ??????????? ???? ???????????????? ?????
    ????????????????????????????use case
    ?????????????? ???????

18
????????????????????? Use Case Diagram
???????????? Actor
System
Human
Software
19
????????????????????? Use Case Diagram
  • Use Case ????????????????????????????????????????
      ???????????????????????????? ????????? 
  • ??? Use Case ????????????????????????????????????
    ??? Diagram ????????????????????????????? Use
    Case ?????

20
????????????????????? Use Cases Diagram
  • ???? (System) ?????????????????
    ????????????????????????????????? ??????????????
    Actor ????????????????????? Use Case ?????
    ???????????
    ?????????????????????? (Recruitment System) 
  • ???????????? System  

21
????????????????????? Use Cases Diagram
  • Communication  ???????????????????????????????????
    ??????????? (?????????????????????????????????????
    ) ??????? Actor ??? Use Case ????????????????????
    ?????????????????? 2 ????????
    ??????????????????????????????????????
  • Relationship  ?????????????????????????????? Use
    Case ??? Use Case ????????????????????????????
    ???????????????????use case?????  2 ??? ???
    Extends ??? Uses  

22
????????????????????? Use Case Diagram
  • Extends ?????????????????????????? Use Case
    ???????????????????? Use Case ?????
    ????????????? Use Case ?????????????????????? Use
    Case ??????????????????????????? ??????????????
    ltltextendsgtgt ????????????? ???? 
  • Uses ???????????????????????? Inherit
    ?????????????????? Use Case ????? ????? Use Case
    ????? ?????????????????? Use Case
    ?????????????????????????????????? ??????????????
    ltltusesgtgt ?????????????? ????

23
Phase 2   ???????????? (Analysis)
  • ??????????????????????????????????????????????????
    ?? ?????????????????????????????????????Use case
    diagram????????? Phase ??? 1
  • ?? Phase ??????????????????? Object Model
  • ??????????????????????????????????????????????????
    ??? ???????? ???????? Component
    ???????????????????????????????? 
  • Component Diagram ??????????????????????????compo
    nent ????? 

24
Phase 2   ???????????? (Analysis)
component???????? 3 ??? ??? SUBSYSTEM, MODULE
??? CATEGORY  ?????????????????
Category
Module
Subsystem
25
Phase 2   ???????????? (Analysis)
  • Objects ????? ?????????????? (Attribute),
    ???????????????(Operation) ???????????????(Relatio
    nship) ??????????? ??????????????????????????????
    ?????????????? 3 ???? ??????

26
Phase 2   ???????????? (Analysis)
  • Class Name ?????????????????????????????
  • Attribute ??????????????????????????????????????
    ???? ????????????????????????? (Attribute)
    ???????????????????????????? ????????????????????
    ???????????????????????????????????
  • Operation ????????????????????????????????
    Method ????????  ???????????????????????
    (Argument) ??????????????????????????????????? 

27
??????????????????????? (Relationship)
  • UML ???????????????????????????????????
    ???????????????????? 4 ??? ?????????????????
  • Association ?????????????????????????????
    ??????????????????? ??? 2 ??? ?????????????????
  •  ???????????????????????     
  •  
  • ?????????????????????

28
??????????????????????? (Relationship)
  • Aggregation ?????????????????? association
    ?????????????????????????? Whole ??? parts ??????
    ??? Whole?????????????? parts ????? ??????
  • ???????????? parts ????????????? Whole 
    ???????????????????????????????? Whole-part
    ????????????????? 
  • ??????????????? by Value
  • ??????????????? by
  • Reference 

29
??????????????????????? (Relationship)
  • Depends on ????????????????????????????????????
    ?????????????????????????????? 2 ????
    ???????????? ??????????????????????????????????
    ??????????????????????????????????????????????????
    ??????????????? ?????????????????????
  • ????????????????????? ?????????????????

30
??????????????????????? (Relationship)
  • Generalization ???????????????????????????????
    ????????????????????????  ????????????????????????
    ??????????????????????????????? ?????
    ?????????????????????????  Super Class
    ?????????????????????????????? Sub Class
    ?????????????????

People
Employee
Student
31
Phase 3   ????????? (Design)
  • ?????????????????????????????????????????????????
    ???????????????????????????????????????????
    ?????????????????????????? 
  • ????????? ??? ???????? centralized ????
    distributed   ?????????????? distributed
    ???????????????????????????????????? 
    ?????????????????????????????  ??????? 0bject
    ??????????????????????????????????????????????????
    ??????? ???????

32
Phase 3   ????????? (Design)
  • ????????? ???????????????????????????????????????
    ???????????????????????(User interface)   
     
  • ??????????????????????????????????????????????????
    ??????????????????????????????????  
  • ????????????????????????????????  
    ??????????????????????????????????????? DBMS
    ???????  
  • ??????????????????????????????????????  
  • ????????? Normalization ?????????
  • ???????????????????????????????  
    ????????????????object??????? ????????(synchronous
    ly) ???? ???????????????????(asynchronously)

33
Phase 3   ????????? (Design)
  • ???????????????? Phase ???
  • ?????????????
  • ?????????????????????????????????????????????
    ????? (GUI classes)
  • ?????????????????????????????????? (database
    classes),
  • ???????????????????(dialogue)  
    ????????????object?????????????????????(Persistent
    object)
  • ???????????????????object, transaction ?????
    ???????
  • Dynamic model ???? Sequence Diagram ??? State
    Diagram

34
Sequence Diagram
  • Sequence Diagram ?????????????????????????????????
    ??????????? object ????? ????????????????(Message
    ) ?????????????????(Event) ????? ??????????? 
    ??????????????????????????????????????????????????
    ????????????????????????????????????????????????

35
?????????????????Sequence Diagram
36
?????????????????Sequence Diagram
  • Object   ??? Instance ??? Class
    ???????????????-?????????? (Message) ??? Object
    ????? ??????????????????????????????
    ?????????????????????????????????? ??????? 
    ???????????????????????????????????????????????
    object ??????? ?????????????????
  •  Message   ???????????????????????????? object
    ???????????? object ???????????????? ???????????
    Message  ?????????? Method ??? object
    ???????????

37
?????????????????Sequence Diagram
  • Message ????????????????????????????? ???????????
  • Result Name   ??? ???????????????????????????????
    ????????????(Message)
     
  • Parameters ??? Argument ????? ????????????
    object ????????????? Method ???????????? Message
    ?????  
  • Return Type   ??? ???????????????????????????????
    ???????????????????? Method ????? ??? Method ????
    ?????????????????????????
  • Constraint  ??? ???????????????? Message

38
???????? Sequence Diagram ????????????????????????
???????
39
State Diagram
  • State Diagram ?????????????????????????????
    object ?????? ??????????????????????
    ??????????????????????????????????????

40
??????????? State Diagram
41
???????? State Diagram???object??????????
42
Phase 4   Implement ??? testing
  • Implement ??? testing ???? Phase
    ??????????????????????????????????????????????????
    ???
  • ??????????????????????????? (Object
    Oriented Programming) ???????????????????????????
    ?????????????????????????????????
  • ??????? Testing  ?????????????????????????????????
    ?????????????????????????????? object (Object
    Testing) 

43
Phase 4   Implement ??? testing
  • ??????????????????????????????????????????????????
    ????????????????????????????????????
    ??????????????????????????????????
    ?????????????????????? ??????????????????????
    Object-Oriented ???? ???
  • 1. Encapsulation ???????????????
  • 2. Inheritance ??????????????????
  • 3. Polymorphism ???????????????????(Message
    ) ???????????????????????????????????

44
????????????????????????? Object-Oriented
  • C
  • Smalltalk
  • Eiffel
  • Object C
  • Object Pascal (???? Delphi)
  • Java 

45
  • ??????????????????????????????????
    ?????????????? (UML notation) ?????
    (????????)
  • Component  ????
    package ?????? Java
  • Class Class
  • Attribute
    Attribute
  • method 
    method 
  • Attribute ????? ??????? read only  ???? set
    method 
  • Attribute ????? ??????? read-write ???? get,
    set method
  • Inherit  Sub class ?????? extends
    ??? Super Class

46
  • ??????????????????????????????????
    ?????????????? (UML notation) ?????
    (????????)
  • ??? Component ???????????????  ?????? import
    package ???? 
  • Module ???? Component ????? 
  • access modifier public ()  ???? public
    ??????
  • private (-)                         ????
    package ??????
  • protected () ????
    protected ??????
  • implementation (?) ??????????? ?
    ???
  • Implement ???????????

  • private ???????????????????
  • ????????????????????????

47
???????? ???? Cancel
  • ?? Attribute ???? 1 ??? ??? remark
  • ?????????????????? String ????? Method ???? 1
    Method ??? save ?????? boolean ????  
  • ???? Cancel Inherite ??????? Transaction

48
???????? ???? Cancel
49
??????????????? Java??? ???? Cancel
  • public class Cancel extends Transaction  
  •    private String remark
  •    public Cancel()
  •     super()
     
  •   
     
  •    public String get_remark()
     
  •     return remark
     
  •   
     
  •    public void set_remark(String
    value)  
  •     remark value
      
  •  
     
  •    public boolean save()
     
  •        ?
  •     
  •    //end class Cancel

50
Phase 5 Maintenance
  • ????? Maintenance ????????????????????
  • ?????????????????????????????????????????????????
  • Cancel ??????????????????????? Implement
    ??????????????????? ????????? ???????????????????
    ??????????????????

51
????
  • ???????????????? Phase ??? 1 ??? Phase ??? 5
    ??????????????????????????????????????????????????
    ??????????????????????????? object
    ??????????????? object ??????????????????????????
    ??????????? ?????????????????
  • ???????????????? Phase ??????????? Phase
    ??????????????????????????????????? object
    ?????????
  • ??????????????????????????????????????????????????
    ????????????????????????????????????

52
Object-Oriented CASE tool
  • ?? Object-Oriented Case tool ?????????????????????
    ??????????????????????????????? ????
  • - Rose from Rational
  • - Pladigm plus from Platinum
  • - Object System from CRC
  • - MetaCASE

53
??????????????????????????????????(OO analysis
and design methods) 
  •  The OOA/OOD method by Coad and Yourdon, 1991a,
    1991b
  • The OOADA method by Booch, 1991
  • The OOSE by Jacobson, 1992
  • The DOOS method by Wirfs-Brock et.al
  • The OMT method by Rumbaugh et.al
  • The OL method by Shlaer and Mellor
  • The OOAD method by Martin and Odell
  • The Fusion method by Coleman et.al
  • The OOSD method by de Champeaux et.al
  • The MOSES method by Henderson-Shellers and Edwards
Write a Comment
User Comments (0)
About PowerShow.com