CHP 3 : ??????????????? - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

CHP 3 : ???????????????

Description:

??????????????????????????????????????. ???????????????. ???????????????. ??????????????????????????????????. Operating System Concepts. Silberschatz and Galvin ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 35
Provided by: marily256
Category:
Tags: chp | algor

less

Transcript and Presenter's Notes

Title: CHP 3 : ???????????????


1
CHP 3 ???????????????
  • ?????????????????????
  • ??????????
  • ???????????

2
3.1 ?????????????????????
  • ???????????????
  • ??????????????????????????????????????
  • ???????????????
  • ???????????????
  • ??????????????????????????????????

3
3.2 ?????????????????????
  • ????????????? ???
  • Analytical
  • Algorithmic

4
3.2.1 ???? Analytical
  • ????????????????????????????????????????????
  • ???????????
  • ?????????????????
  • ???????????????????????????????????????
  • ???????????????????
  • ?????????????????
  • ??????????

5
???????????? Analytical
  • ?????????????????????????????? 2 ??????????? 3
    ??? 4 ?????????????????????????????
  • ??????? c2 a2 b2
  • ????????????
  • ??????????? c 5

6
3.3 ?????????? (Algorithm)
  • ??????????????????????????????????????????????????
    ??????????
  • ?????????????????????????????????????????
  • ??????????? operations ???????????????????????????
    ?????????????????
  • ?????????????????????????????????????????????????
    ?????????????? generality
  • ??????????????????????????????????????????????????
    ?????

7
?????????? (Algorithm)
  • ????????????????????????????????????????????
  • ??????????????????????????????????????????????????
    ???????????????????????????????????
  • ??????????????????????????????????????????????????
    ?????????????????????????????

8
?????????? (Algorithm)
  • ?????????????????????????????????????
  • ?????????????????????????? computer
  • ??????????????????????????????
  • Input ???????, Processing ????????????, Output
    ????

9
??????????????????????????
  • ????????????? (?????????????????????)
  • ????? (????????????????????????????????)
  • ???????????????? (??????????????????????????????
    ?)
  • ??????????????? (?????????????)

10
??????????????????????
  • ????????? (Narrative description)
  • ?????? (Flowchart)
  • ????????? (Pseudocode)

11
3.3.1 ?????????????
  • ???????? ?????????????????????????????????????????
    ???????? 4 ????? ????????????????
    ?????????????????? 50 ??????????
    ?????????????????? 50 ?????? ???????
  • Algorithm Read a set of four marks. Compute
    their average by summing them and divided by 4.
    If this average is below 50, display the grade
    with a failing message, otherwise display the
    grade with a passing message.

12
3.3.2 ?????? (Flowchart)
  • ?????????????????????????????????????
  • ?????????????????????????????????????
  • ????????? ????????????????????????????
  • ???????????????????????

13
???????????????
  • System Flowchart
  • ???????????????????????????????????????????
  • Program Flowchart
  • ????????????????????????????????????
    ??????????????????????????????????????????????????
    ?

14
???????????????????????
  • ????????????????????
  • ??????????????????????
  • ?????????????????

15
?????????????????????????????
  • Start/Stop Symbol
  • Read/Write Symbol
  • The Operation Symbol
  • Lines and Arrow
  • Connector, New page

16
?????????????????????????
A
B
C
17
????????
  • ?????????????????????????????
  • ???????????????????????????

18
????????
  • ???????????????????????????????? 2
    ??????????????????????????????????????
    ???????????????????????????

19
????????
  • ????????????????????????????????????????????
    ??????????????????????????????????????????

20
??????????????????????????????????
  • Decision Symbol
  • ???????????????????????????????????????????????
    ???????? ????????
  • Agt B , A gt B , A lt B , A lt B ,
  • A B , A ltgt B etc.

21
??????????????????????????????
true (????)
false (????)
????????
A
B
22
????????
  • ????????????????????????????????????
    ?????????????????? 70 ????? Temp. greater than
    70 ???????????? Temp. less than 70

23
????????
  • ???????????????????????????????????????
    ???????????????????????????????
  • ????? ????? gt 80 ???? G
  • ????? gt 50 ???? P
  • ????? lt 50 ???? F

24
?????????????????????????????
  • Node
  • ??????????????????????????????????????????
  • ??????????????????????

25
?????????????????????????????
  • REPEAT FOR
  • ?????????????????????????????????
  • REPEAT WHILE
  • ?????????????????????????
  • REPEAT UNTIL
  • ?????????????????????????

26
?????????????????????????
A
A
????
????
????????
????????
????
????
Repeat Until (Do Until)
Repeat While (Do While)
27
????????
  • ???????????????????????????????????????
    1239899100 ????????????????????

28
????????
  • ????????????????????????????????????
    ??????????????? ??????????????? ??????????? 100
    ?? ???????????????

29
3.3.3 Pseudocode
  • ??????????????????????????????????????????????????
    ???????????????????? ????????????????????????????
    ?????????????????????????????????????????????????
    ????????????????

30
1) ??????????????????????
  • ??????? 1 Header ?????????????????
  • ??????? 2 Declaration ????????
  • ???????????????????????????????????
  • ????????????????????????? ???????????????
  • ??????? 3 Body ???????
  • ? ?????????????????????????????????????????
    ??????????????????????????????

31
2) ??????????????????????????????????????
  • Assignment Statement
  • If Statement
  • Case Statement
  • Repeat Statement
  • Goto and Exitloop Statement
  • Halt Statement

32
IF Statement
  • IF ltconditiongt
  • Then .
  • endif
  • IF ltconditiongt
  • Then .
  • else .
  • .
  • endif

33
REPEAT Statement
  • Repeat for ltINDEXgt ltSequencegt
  • end repeat
  • Repeat while ltlogical expressiongt
  • end repeat
  • Repeat until ltlogical expressiongt
  • end repeat

34
Performance ???????????????????
  • ??????????? (Correctness)
  • ?????????? (Clarity)
  • ??????????? (Efficiency)
Write a Comment
User Comments (0)
About PowerShow.com