Title: ??????? 5653309 ???????????????????????? (Object Oriented Programming)
1??????? 5653309????????????????????????(Object
Oriented Programming)
- ?????????????????????????????????
- ????????????????
1
2????????????????????
- ???? 1967 ???? Simula67 ???????????????????
?????????????????????????????????????
(Simulation) - ??????????????????????????????????????????????????
??????????????????? ??????????????????????????????
????????????????????????????????????????????
????????????????????? ??????????????????? - 1990s ????????????????????????????????????????????
?????? ???????????????????????????????????????????
?????????????????
3???????????????? (Object Oriented Programming)
- ???????????????????????????? 2 ???
- ???????????????????????????
- ????????????????????????
4???????????????? (Object Oriented Programming)
- ??????????????????????????? ???
?????????????????????????????????? ??????????
??????????????????????????????????????????????????
?????????? ???????????????? ??????????????????????
??????? ????????????????? ???????????????????????
- ???????????? ????????? ????????? ????????????
?????????? ??? ??????
5???????????????? (Object Oriented Programming)
- ???????????????????????? ??? ?????????????????????
??????? ??????????????????????????????????????????
?????????????????????????????? - ??????????????????????????????????????????????????
????????????????????? ????????????????????????????
????????????? ????????????????????????????????????
?????????????????????????? - ???????????? ???????? ?????????????????
(??????????????????????????????????????????????)
6???????????????? (Object Oriented Programming)
- ??????????????????????????????????????????????????
????? ????????????????????????????????????????????
??????????????????????????????????????????????????
????? - ??????????????????????????????????????????????????
???????????????????????????????? - ??????????????????????????????????????????????????
?????????????????????????????????????
7???????????????? (Object Oriented Programming)
- ????? ??????????????
- ??????? ??????????????????? ????????????????????
???????????????????????????????
????????????????????????????? ????????????????????
????????????????????????
8??????????????????????????????????????????????????
??????????????????????
9???????????????????????
- ??????????????????????????????????????????????????
?????? ???????? Problem space - ??????????????????????????????????????????????????
??????????????????? ?? ????? ???????
??????????????? ????????????? ??? ?????????
??????????????????????
10Problem Space
????????????
????????? gtgt ??????? ?????????????????
?????????????? gtgt ??????? ?????????????????????
11(No Transcript)
12??????????????????????????????????
- ???????????????????????????????????????
- ?????????????????????????????????????????
- ????????????????? ????? x ???
- ??????? ???????? ????????? ??? ???????
?????????????????????
??????????????????????????????????????
13??????????????????????????????????
- ?????????????????????????????????????????????
- - ???????????????????? ????
?????????? ????????? ????????????????? - - ???????????????????????????????
- - ???????????????????????????? ????
???????????????????????????????????? ?????????
??????? ?????????? ??????? ???????????????????
??????? ??????????????????? ????????????????? - - ??????????????????????????????
?????????????????????????????????????
??????????????? ???????????? ????????? ???????
14??????????????????????????????????
???????
?????????
???????
15??????????????????????????????????
- ????????
- ??????????????????????
- ????????????
- ?????????
- ??????????????????????????????????????
???????????? ??? ???????????????????????????????
???????????????????????????????????
16?????????????? ???? (Alan Kay)
- ???????????????????????? small Talk
?????????????????????????????????????????
???????????????????????????????????? - ???? ?????????????
- ??????? ??? ??????????????????????????????????????
- ????????????????????????????
- ???????????????
- ??????????????????????????????????????????????????
???????
17???? ?????????????
- ???????????????????????????????????
??????????????????? - ??????????????????????????????????????????????????
?????? (JAVA) ???? ???????????????????????????????
? - ?????????????????? (JAVA) ????????????????????????
??? ???? ?????????????? ???????
18???????????????????????
- ???????????????????????????????????????????? ???
?????????????????????????????????(Message)
?????????????????????????????????
19??????????????????
- ??????????????????????????????????????????
???????????????????????????? ???
??????????????????????????????????
??????????????? attribute - ???????????????????????????????????????????? ???
- ??????????????????????????????????????????????????
?????????????????????
20??????????????????
21??????????????????????
CPU
RAM
ROM
DISK
22?????????????????????????????????
- ???????????? ??? ???? (Class)
- ??????????????????????????????????????????????????
????? ??????????????????????????
??????????????????????????????????????????
23?????????????????????????????????
- ??????? ???? ???????????? ????????
- ????????? ??? ??????????????????????
??????????????????????????????????????????????????
???????
?????
?????
?????
24????????????????????????????
Siemens
MobilePhone
String bandname Button button Screen
screen Antenna antenna Simm simNet
call() receive() hangup() sendSMS()
Ericsson
Nokia
25????????????????????????????????????????
- ??????????????????????????????????????????????????
? ????????????????????????????????????????????????
??????????????????????????????????????????????????
???????????? ????????????????????? - ????????????????????????????????? ?
?????????????? ???? - ???? ??? shape ???????????????????????????????????
?? Circle, Triangle, Rectangle ??????? - ??????? ???????????????? Circle
???????????????????????????? Triangle ???
Rectangle
26????????????????????????????????????????
27???????????????????????????????????
- ??????????????????????????????????????????????????
???????????????????????? - Encapsulation (???????????????)
- Data Hiding (?????????????????)
- Inheritance (?????????)
- Polymorphism (??????????)
28Encapsulation (???????????????)
- ??? ??????????????????????????????????????????????
?????????? ??????????????????????????????????????
29Data Hiding (?????????????????)
- ??? ???????????????????????????????
- ??????????????????????????????????????????????????
??????????????????????????????????????????????????
????????? - ??????????????????????????????????????????????????
????? ???????????????????????????????????????
??????????????????????????????????????????????????
??????
30Data Hiding (?????????????????)
????????? ?????????????? ?????????????????????????
? ?????????????????????????????
??????????????????????? ???????
31Inheritance (?????????)
- ??????????????????????????????????????????????????
??????????????????????????????????????????????????
?????????? ??????????
32Composition
- ???????????? Inheritance ?????????????????????????
?????? ??? ??????????????????? ???????????????????
??????????????????????? ???????? Reused - ?????????????????????????????????????? Reused
?????????? ??? Composition ??? ????????????????
?????????????????????????
33Composition
- ???????????? ?????? ?????????? ?????? ?????
???????? ??????? ??????? ???????
34Polymorphism (??????????)
- ??????????????????????????????????????????????????
??????????????????????????????????????????????????
??????????????????? ??? ????????????????
????????????
35???????????????????????
- ????????????????????????????? ????????????????????
????????????????????????????????????????? - ????????????????????????????????????????????????
????????????? ???????????????????????????
36???????????????????????
37????????????
- ???????????????????????? ?????????????????????????
???????? - ??????????????????????????????????????????????????
??????????????? - ??????????????????????????????????????????????????
????? ???????????????????????????????????????
38????????????
- ????? (Object) ??????????? 2 ?????? ???
- ?????????????????? (Tangible) ???
????????????????????????????? ???? ????????
??????????? ????? ????? ??????? - ?????????????????? (Intangible)
????????????????????????????? ???? ????????????
???? ???????????? ????????????????? ??????? - ?????????????????
- ????????? (Attribute) ?????????? (Data)
- ????? (Method) ???????????? (Behavior)
39?????????????
- ????????
- ????????? ???? ???? ???? ?????????????
- ????? ???? ????????? ??? ???????
40?????????????
- ??????
- ????????? ???? ?????? ???? ?????
- ????? ???? ?????????? ?????????????
41?????????????
- ?????
- ????????? ???? ???? ?????? ?????
- ????? ???? ???? ???? ????????????
42???????????????????????
Class
Object
43???????????????????????
44???????????????????????
45???????????????????????????????????????
- ?????????????????
- ????????????
- ???????????????????
- ?????????? ????????????????????
46????????????????? (Information Hiding)
- ?????????????????????????????????????
??????????????????????????????????????????????????
????????? ??? ????
???????????????????????? ?????????????????????? ?
??????????? ????? ???????????????????? ???????????
???? ??????????????????????????
47???????????? (Interface)
- ??????????????????????????????????????????????
???????? User interface
?????????????????????????????????
??????????????????????????????????????????????????
????
48 ??????????????????? (Reusable)
- ????????????????????????????????????????? ???
?????????????? ???????????????????????????????????
????????????????????????? Reuse - ??????????????????????????????????????????????
???????????????????????????????????
???????????????????????????????????????? - ???????????? ????????????????????????????????
??????????? ?????? ????? ?????? ???????
49???????????????????????????????????
50?????????? (Polymorphism)
- ?????????? ??? ???????????????????
- ??????????????????????????????????????????????????
????????????????????????????????????? - ????????????????????????????????
51?????????????????????????????????
52?????????????????????????????????