Object Oriented Programming - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Object Oriented Programming

Description:

4 uml uml – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 33
Provided by: TalP5
Category:

less

Transcript and Presenter's Notes

Title: Object Oriented Programming


1
????
????
4
UML??????? ??? ???? ??? ?????
2
UML??????? ??? ???? ??? ?????
  • ?"? ?? ??????

3
UML Unified Modeling Language
  • Language ??? (??????)
  • Modeling ????? ?????? ?? ????? - ??? ?? ??
    ?????
  • Unified ??????. ????? ????? ??????? ?????
    ??????? ??????? ?????, ????? ??????-?????, ??????
    ????? ????.

4
???? ???????
  • ???? ??? ??? ????? ?????? ????? ??????.

??? ????? ???
5
???? ???????
  • ???? ??? ??? ????? ?????? ????? ??????.

????? ???? ???? ?????
6
???? ???????
  • ???? ??? ??? ????? ?????? ????? ??????.

class Car public int GetNumber ()
return Number private int Number )
Car
Number integer
???? ?????UML????
7
???? ???????
  • ???? ??? ??? ????? ?????? ????? ??????.

Car
Number integer
???? ????UML????
8
UML ????? ?????
  • ???? UML ???? ???? ??? ???? ?? ???? ??????
    ??????.

class Car public int GetNumber ()
return Number private int Number
)
Car
Number integer
????
??????
?????
9
?????? ????? ?????
  • ????? ?????? ?????? ????? ???????.

class Car public int GetNumber ()
return Number private int Number
)
??????
?????
10
UML ????
  • UML ??? ??? ??? ?? ????? ????? ???? ?????
  • ?- UML ?? ???? ????? ??? ???? ??????
  • ?????
  • ?????? "???? ?????? ???? ?????? ???? ????.
    ??????? ??????, ?? ???? ????? ????? ????? ????
    ????"
  • UML ??? ??? ??????.

120
????
??? ????
11
??????? ?? ??????? ?
.
  • ?? ????? ?????? ?
  • ????? ? "???? ???? ?????"
  • ???? ?????? ? "?????? ????? ????? ??????? ??????"
  • ??????? ? "?? ?? ??? ?? ???? ????? ????"
  • ?????? ???? ? "?????? ???? ????? ?????? ?????"
  • ??? ???? ? "?? ?? ??? ???? ???? ?? ?????
    ????? ???"

?? UML
???
????
?? UML
12
UML ??? ??????
  • ?- UML ??? ??? ??? ?? ?????? ??? ??? ?? ???????
    ??? ?????? ????.
  • ??? ????? PASCAL ?? ????? ?????? ????? ?????
    ?????? ????? ????? ?? ??? ???? ?? ?? UML.
  • ???? ?????? ????? ?? ?????? ?????? ?????

13
?????? ????? ?????? ?????
  • ?- 1986 ????? ???? ???? ??? ???? ??? ?????? ?????
    THERAC-25 ?????? ???? ????? ??????? ??????? ??
    ?????, ?? ??? ??????, ?????? ????? ?????.
  • ???? ???????? ?? ???? ????? ????? ?- 1991 ????
    ???? ?????? ?? ????? ???? ??????? ?????, ??? ????
    ????? ?????? ?????? ???? ??????? ?? 678 ???
    ?????? ????? ????? ??????.29 ??? ????? ?- 97
    ????? ?????? ???? ??????.

14
?????? ????? ?????? ?????
  • ?- 1999 ??? ???? ??? ?? NASA ?????? ?????? ????
    ???? ?????? ?????
  • Mars Climate Orbiter ????? ?? ???? ?????? ??????
    ????? ?? 170 ?"? ?????? ????? ?????? ??????
    ?????? ?????? ?? ????? ??????
  • Mars Polar Lander ???? ??? ????? ???????. ?????
    ???? ??? ??? ????.

15
Ariane 5
  • 4 ????? 1996 ????? ?????? ?? ???? Ariane 5 .
  • 40 ????? ???? ?????? ????? ?? 3700 ???, ???? ???
    ???????, ????? ???????.
  • ????? ???? ??? 10 ???? ???? 8 ??????? ????.
  • ???? ?????, ??? ??? ?????, ??? ??? ??????? ????.

16
????? ????????? ?????? ???
  • ???????? ??????? ?????? ?????? ????? ?????, ????
    ?????? ?????? ?????? ??????.
  • ???? ????? ?????? bh(Horizontal Bias) ?????
    ??????? ??????? ?? ????, ???? ??? ???? ??????
    ???? ?????? ????? ?????? ?????? ???.

double d_bh short s_bh sense_horizontal_velocity
(d_bh) s_bh d_bh // OPERAND ERROR
17
UML ??? ??????
  • ????????? UML ???? ????? ??????, ?????? ??????
    ???? ???? ????? ????? !
  • "????? ??????" ???? ?????? ?? ???? ?? ?????,
    ????? ????? ????? ??????? ?? ??????.
  • Rhapsody, ??? ?????? ????? I-Logix ???? ?????
    ??? ?- UML ??? ???? ????? ??????.
  • ???? ?????? ??????? ??????

18
?????? ?- UML
  • Class diagrams
  • ???? ?????? ???????
  • State diagrams
  • ????? ??????? ??????
  • Sequence diagrams
  • ??? ??????? ????
  • ????

19
UML Class Diagram
??????
????
4
???
1
????
1
  • ?????? ?????? ?-4 ??????, ??? ?????

20
UML Class Diagram
  • "??? ????" ?"????? ?????" ?? ????? ?? ???????

??????
??? ????
????? ?????
21
UML State Diagram
??????
go()
?????
?????
stop()
  • ??????? ??? ????? ?? ???? ????? ?? ???? ?????.
    ?????? go() ?- stop() ?????? ??????? ?? ???????
    ???? ????.

22
UML Sequence Diagram
  • ??? ??????? ?????? ??????
  • ????
  • ????? ?????
  • ????? ??????
  • ????

Car
go()
releaseBreak()
driver
engageGear()
accelerate()
23
????? ?- UML ?????? ?????
  • ????? ???? ?????? ???? ????? ?????
  • ????? ???? ?? ??????
  • ????? ????

class Car public int GetNumber ()
return Number private int Number
)
24
?????
25
????? ??????
  • ??? ???????? ?????? ????? ??? ??? "????"
    (Cohesion) ?? ???????? ?? ???????.
  • ???? ??? ???? ????? ?? ???????? ?????? ?????? ??
    ???.
  • ??? ??? ???? ???? ?????? ???? "????".
  • ???? ????? ??? ???? ????? ??? ???? ?? ?????? ??
    ?? ??????, ????? ???? ????? ????? ?? ?? ?? ?????
    ?? ????? ?????.
  • ???? ???????? ???????? ?- UML ???? ?????? ??
    ??????? "?????"

26
????? "????"
Car
  • ?????? ????? ??????? ??? ??? ??? ??? ??????.

OwnerName string IsurancePremium float
PayInsurance(sum float) ChangeOwner (name
string)
. . .
27
?????? "?????"
  • ??? ????? ????? ????.

1
0..1
InsurancePolicy
Car
YearlyPremium float
Number Integer
. . .
InsurancePolicy(CarNumber) PayInsurance (sum
float)
. . .
28
?????? ??????
????? ???? ?? ??????
  • ????? ?? ??????

??????
????? ?????
???
?????
?????
  • ????? ?????? ??? ?????? UML ??????? ????? ????
    ????? ????? ????? ??? ?????

29
?????? ??????
????? ???? ?? ??????
  • ????? ?? ??????

??????
????? ?????
???
?????
?????
  • ????? ?????? ??? ?????? UML ??????? ????? ????
    ????? ????? ????? ??? ?????

30
?????? ??????
?????
?????
  • ????? ?????? ??? ?????? UML ??????? ????? ????
    ????? ????? ????? ??? ?????

31
?????
  • UML ??? ?????? ?????? ?? ???? ????????.
  • UML ??? ???????.
  • ?- UML ????? ?? ????? ??? ??????.
  • ?- UML ??????? ????? ????? ?? ????????, ?????-
    class diagram ????? ?????? ??????? ??????.
  • UML ????? ?? ?????? ??? ????? ??? ?????? ???????
    ????? ?????.

32
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com