???????????S???F?S ???G/??S ?? C - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

???????????S???F?S ???G/??S ?? C

Description:

???ta?? ??d??a: a??a?? pa??de?? a p??? ap?f??? (se Pascal) ... while(PathName[StartPath Pos] ';') and ((StartPath Pos) =length(PathName)) do ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 42
Provided by: Panagioti7
Category:
Tags: pathname

less

Transcript and Presenter's Notes

Title: ???????????S???F?S ???G/??S ?? C


1
??????? ?O???? ??? S??? (LAYOUT STYLE)
  • ???ta?? ??d??a a??a?? pa??de??µa p??? ap?f???
    (se Pascal)

procedure InsertionSort( Var Data SortArray_t
FirstElmt Integer LastElmt Integer ) Use
the insertion sort technique to sort the "Data"
array in ascending order. This routine assumes
that Data FirstElmt is not the FirstElmt
element in Data and that Data FirstElmt-1 can
be accessed. Const SortMin '' Var
SortBoundary Integer upper end of sorted
range InsertPos Integer position to insert
element InsertVal SortElmt_t value to
insert LowerBoundary SortElmt_t first value
below range to sort begin Replace element at
lower boundary with an element guaranteed to be
first in a sorted list LowerBoundary Data
FirstElmt-1 Data FirstElmt-1 SortMin
The elements in positions FirstElmt through
SortBoundary-1 are always sorted. In each pass
through the loop, SortBoundary is increased, and
the element at the position of the new
SortBoundary probably isn't in its sorted place
in the array, so it's inserted into the proper
place somewhere between FirstElmt and
SortBoundary. for SortBoundary FirstElmt1
to LastElmt do begin InsertVal Data
SortBoundary InsertPos SortBoundary while
InsertVal lt Data InsertPos-1 do begin Data
InsertPos Data InsertPos-1 InsertPos
InsertPos-1 end Data InsertPos
InsertVal end Replace original lower-boundary
element Data FirstElmt-1 LowerBoundary
end InsertionSort
?O????S ?O??S ?????? ??T?S!!
2
??????? ?O???? ??? S??? (LAYOUT STYLE)
  • ???ta?? ??d??a ? ?d??? ??d??a? ???? ?a??te?a
  • procedure InsertionSort( Var Data SortArray_t
    FirstElmt Integer
  • LastElmt Integer )
  • Use the insertion sort technique to sort the
    "Data" array in ascending
  • order. This routine assumes that Data FirstElmt
    is not the
  • first element in Data and that Data
    FirstElmt-1 can be accessed.
  • Const
  • SortMin ''
  • Var
  • SortBoundary Integer upper end of sorted
    range
  • InsertPos Integer position to insert element
  • InsertVal SortElmt_t value to insert
  • LowerBoundary SortElmt_t first value below
    range to sort
  • begin
  • Replace element at lower boundary with an
    element
  • guaranteed to be first in a sorted list
  • LowerBoundary Data FirstElmt-1
  • Data FirstElmt-1 SortMin

? ??????? ??? ??????????? ?? ??G??? ??G??OS? ???
?O????.
? S?GG??F??S ??? ?O???? ??? ??? ?G???? G?? ??
?????S??? ??? ???T?O??!!
Data InsertPos InsertVal end Replace
original lower-boundary element Data
FirstElmt-1 LowerBoundary end
InsertionSort
3
??????? ?O???? ??? S??? (LAYOUT STYLE)
  • ???ta?? ??d??a s?st? ??aµµ???? ??d??a?
  • procedure InsertionSort
  • (
  • Var Data SortArray_t
  • FirstElmt Integer
  • LastElmt Integer
  • )
  • Use the insertion sort technique to sort the
    "Data" array in ascending order. This routine
  • assumes that Data FirstElmt is not the
    first element in Data and that Data FirstElmt-1
  • can be accessed.
  • Const
  • SortMin ''
  • Var
  • SortBoundary Integer upper end of sorted
    range
  • InsertPos Integer position to insert
    element
  • InsertVal SortElmt_t value to insert

SOS?? ???S? ???O?.
4
??????? ?O???? ??? S??? (LAYOUT STYLE)
  • ???ta?? ??d??a s?st? ??aµµ???? ??d??a?
    (s????e?a)
  • for SortBoundary FirstElmt1 to LastElmt do
  • begin
  • InsertVal Data SortBoundary
  • InsertPos SortBoundary
  • while InsertVal lt Data InsertPos-1 do
  • begin
  • Data InsertPos Data InsertPos-1
  • InsertPos InsertPos-1
  • end
  • Data InsertPos InsertVal
  • end
  • Replace original lower-boundary element
  • Data FirstElmt-1 LowerBoundary
  • end InsertionSort

5
??????? ?O???? ??? S??? (LAYOUT STYLE)
  • ???ta?? ??d??a µ??f?p???s? ??d??a p?? a???p??e?
    t?p???af??? ?a?a?t???st??? (µe ?at??????
    e??a?e??)

6
T?????O???S ????S ???????S ?O???? ??? S???
  • ? ??S??? ???? ??S SOS??S ???F?????S?S
  • ?e?????? p?? ??a??p????? t?? ??d??a e??a? p??ta
    ???s?µe?, a??? ??? t?s? s?µa?t???? ?s? ??
    te?????? p?? a?ade??????? t? ?????? t?? d?µ? ?a?
    ??????s?.
  • ??T?O???? ??? ?????G?S???? ???????? ???S
    ???G???????S
  • ? d??ta?? t?? ??d??a e??a? µ?a ???s?µ? ??de???
    t?? d?µ?? e??? p?????µµat??. ??? ? ?p?????st??
    st????eta? ap???e?st??? se e?t???? ?p?? begin ?a?
    end ? ?a? , ? ?????p?? d?µ?????e? pa?ast?se??
    a?t?????? ap? t?? ?pt??? pa???s?as? t?? ??d??a.

7
T?????O???S ????S ???????S ?O???? ??? S???
  • ?a??de??µa ??d??a p?? d?af??et??? s?µas?a ??e?
    ??a t?? ?p?????st? ?a? d?af??et??? s?µas?a ??e?
    ??a t?? ?????p?
  • / swap left and right elements for whole array
    /
  • for ( i 0 i lt MAX_ELMTS i )
  • LeftElmt Left i
  • Left i Right i
  • Right i LeftElmt
  • ?e?te?? pa??de??µa ??d??a p?? d?af??et??? s?µas?a
    ??e? ??a t?? ?p?????st? ?a? d?af??et??? s?µas?a
    ??e? ??a t?? ?????p?
  • x 34 27

8
T?????O???S ????S ???????S ?O???? ??? S???
  • ???a? p?? ap?? ? s????af? ??d??a p?? ?a e??a?
    a?a???s?µ?? ap? t?? ?p?????st?, a??? p???
    pe??ss?te?? s???et? ? s????af? ??d??a p?? ?a
    e??a? a?a???s?µ?? ap? t?? ?????p?.
  • ?? pe??aµa µe t? s?a????a, t??? experts ?a? t???
    a???????? ?ta? ta p????a e??a? t?p??et?µ??a se
    ??se?? p?? ?a µp????sa? ?a eµfa??st??? st?
    d????e?a e??? pa????d??? ? µ??µ? e??? expert
    ?e?t????e? p?? ap?te?esµat??? ap? t? µ??µ? e???
    a???????. ?ta? ta p????a t?p??et???ta? t??a?a de?
    ?p???e? d?af??? µeta?? expert ?a? a???????.

9
T?????O???S ????S ???????S ?O???? ??? S???
  • S??????S?? ?ta? ? p????f???a a?t?st???e? se
    d?µ?µ??? ???s? - t?p???t?s? se ??se?? p?? ?????
    ???µa - ? e?d???? µp??e? ?a ??µ?ta? ?a??te?a.
    ?ta? ? p????f???a de? a?t?st???e? se d?µ?µ???
    ???s? ? e?d???? de? µp??e? ?a ??µ?ta? p???
    ?a??te?a ap? ?t? ? a???????.
  • S??? ???G???????S?? ?ta? ?? e?t???? t??
    p?????µµat?? e??a? d?e??et?µ??e? se ?????? se???
    (p?? e??a? e????a a?t???pt?) ?? e?d????
    eµfa?????? ße?t??µ??e? d??at?t?te? ap?µ??µ??e?s??
    se s??s? µe t??? a????????. ?ta? ?? e?t???? e??a?
    a?a?ateµ??e? (? ?ts? fa??eta?) de? ?p???e?
    d?af??? st? d??at?t?ta ap?µ??µ??e?s?? t?? ???????
    t?? ??d??a.

10
T?????O???S ????S ???????S ?O???? ??? S???
  • ?ed?µ???? t?? p?????a? t?? st?? d??ta??? ??d??a
    ?a? t?? eµµ???? t?? p????aµµat?st?? st? d??? t???
    st??, ?? ?ept?µ??e?e? t?? s???e???µ???? µe??d??
    d?µ?s?? p?????µµat?? e??a? p??? ????te??
    s?µa?t???? ap? t? ?e????? ?t? te???? ? ??d??a?
    ??e? µ?a d?µ?.
  • ?? ?a??? p????aµµat?st?? ?a p??pe? ?a e??a?
    a????t?? se ??e? p?a?t???? d??ta??? ??d??a ?a? ?a
    ????et??? p?a?t???? p?? ap?dede??µ??a e??a?
    ?a??te?e? ap? a?t?? p?? ???s?µ?p?????, pa???? p??
    ? a??a?? a?t? µp??e? a????? ?a d?µ?????e? µ?a
    d?s????a.

11
T?????O???S ????S ???????S ?O???? ??? S???
  • St???? µ?a? s?st?? d??ta??? ??d??a
  • ????ß?? a?apa??stas? t?? ??????? d?µ?? t?? ??d??a
  • S??ep?? a?apa??stas? t?? ??????? d?µ?? t??
    ??d??a ??p??a st?? ????? t?se? p????? e?a???se??
    p?? e??a? te???? d?s???? ?a d?a??????µe s??epe??
    ?a???e? d?µ?s?? ??d??a
  • ?e?t??s? a?a???s?µ?t?ta?
  • ???e?t???t?ta se t??p?p???se?? sta ?a?? s??µata
    d??ta??? ? t??p?p???s? µ?a? ??aµµ?? ??d??a de?
    ep?f??e? t??p?p???se?? st?? ?p????pe? ??aµµ??

12
???????S ???????S ?O????
  • ?e??
  • ???s?µ?p??e?te ?a?a?t??e? ?e???, tabs, ?a?a?t??e?
    a??a??? ??aµµ?? ?a? ?e??? ??aµµ?? ??a ?a
    ße?t??sete t?? a?a???s?µ?t?ta t?? p?????µµat??
  • Fa?taste?te t? ???? t?? ?efa?a???, t?? pa?a???f??
    ?a? t?? p??t?se?? se ??a ß?ß??? ?atade???????
    st?? a?a???st? p?? ?a ???a??se? ???t??? ??a ??µa.
    ? p????f???a p?? pe????eta? se ??a p????aµµa
    e??a? p??? p?? p???? ap? t?? p????f???a p??
    pe????eta? sta pe??ss?te?a ß?ß??a.

13
???????S ???????S ?O????
  • ?e??
  • S?????? se ??a ? d?? ?ept? µp????µe ?a d?aß?s??µe
    ?a? ?a ?ata??ß??µe µ?a se??da ß?ß????, a??? ??
    pe??ss?te??? p????aµµat?st?? de? µp????? ?a
    ?ata???s??? ??a p????aµµa µe a?t?? t?? ???µ?.
    S??????S?? ??a p????aµµa p??pe? ?a pa???e? p???
    pe??ss?te?e? e?de??e?? ??????s?? ?a? d?µ?? ap?
    ?t? ??a ß?ß???.
  • ?µad?p???s? ?a ?e?? ???s?µ?p?????ta? ??a t??
    ?µad?p???s? e?t???? p?? s?et????ta? µeta?? t???.

14
???????S ???????S ?O????
  • ?e??
  • ?e??? ??aµµ?? ?s? s?µa?t??? e??a? ? ?µad?p???s?
    ??aµµ?? p?? s?et????ta? µeta?? t???, ???? t?s?
    s?µa?t???? e??a? ? d?a????sµ?? e?t???? p?? de
    s?et????ta? µeta?? t???. ??t? ???eta? µe t??
    ?e??? ??aµµ?? p?? ??s?ast??? ???s?µ?p?????ta? ??a
    t? ?????µa ???? pa?a???f?? ??d??a.
  • ??e? ß?e?e? ?t? ? ß??t?st? a?a????a ?e???
    ??aµµ?? se ??a p????aµµa e??a? 8 µe 16 .
    ?e??ss?te?e? ?e??? ??aµµ?? a??????? d?aµat??? t??
    apa?t??µe?? ????? ap?sfa?µ?t?s??.

15
???????S ???????S ?O????
  • ?e??
  • St????s? St???????µe ta ?µ??a st???e?a (p.?.
    te?est?? a???es??) st?? ?µ?de? e?t???? p??
    s?et????ta? µeta?? t???. ??t? ? ta?t??? ep?te??e?
    t?? ?d?a ?t? ?? s???e???µ??e? e?t???? a??????
    ??e? st?? ?d?a ?µ?da.
  • ?s???? ???s?µ?p????µe es???? ??a ?a ?atade????µe
    t? ?????? d?µ? t?? p?????µµat??. Sa ßas??? ?a???a
    ????et??µe t?? es??? e?t???? ??t? ap? t?? e?t???
    st?? ?p??a ?????? a?t?? ?p????ta?.
  • ?e??te? ????? de??e? ?t? ?ta? ???s?µ?p?????ta?
    es???? ap? d?? µ???? t?sse??? ??se?? ?
    ?ata???s?µ?t?ta t?? p????aµµ?t?? ße?t???eta? ap?
    20 µ???? 30.

16
???????S ???????S ?O????
  • ?a?e???se??
  • ???s?µ?p??e?te pa?e???se?? p??? p?? s???? ap? ?s?
    ??µ??ete ?t? sa? ??e?????ta? ??a ?a d?e???????ete
    t?? e?f??se?? p?? s??d?????? pe??ss?te???? ap?
    d?? ?????.
  • ?a??de??µa C p?? ap?t?µ?ta? ? ??f?as?
  • 124 3 7 / 8

17
S??? ???????S ?O????
  • ??a block ??d??a pe????e?eta? se ???e?? ??e?d??
    st?? Pascal µeta?? begin ?a? end ?a? st? C µeta??
    ?a? . ????? ap? ta ??µata p?? s?et????ta? µe
    t? d??ta?? t?? ??d??a ????? ?a ?????? µe t?
    d??ta?? blocks ??d??a. ?a t?sse?a p?? s????
    ???s?µ?p????µe?a st?? d??ta??? e??a?
  • ta ????a d?e??et?µ??a blocks (pure blocks)
  • ? d??ta?? t????? ??aµµ??
  • ? p??s?µ???s? ????a d?e??et?µ???? blocks
  • ???s? ????? block begin ?a? end
  • ?? st?? d??ta??? p?? ep????eta? e?a?t?ta? ?a? ap?
    t? ???ssa p????aµµat?sµ??.

18
S??? ???????S ?O????
  • ????a d?e??et?µ??a blocks (pure blocks)
  • pa?ade??µata ??d??a Ada
  • if PixelColor RedColor then
  • statement1
  • statement2
  • ...
  • end if
  • while PixelColor RedColor loop
  • statement1
  • statement2
  • ...
  • end loop

case PixelColor of when RedColor gt
statement1 statement2 ... when
GreenColor gt statement1 statement2
... when others gt statement1
statement2 ... end case
19
S??? ???????S ?O????
  • d??ta?? t????? ??aµµ??
  • µe????? f????
  • ß??e?e?
  • a???

while PixelColor RedColor do begin
statement1 statement2 ...
end
if ( SoldCount gt 10 and PrevMonthSales gt 10 )
then if ( SoldCount gt 100 and PrevMonthSales gt
10 ) then if ( SoldCount gt 1000 ) then begin
Markdown 0.10 Profit 0.05 end
else Markdown 0.05 else
Markdown 0.025 else Markdown
0.0
20
S??? ???????S ?O????
  • ?p?fe??ete t? d??ta?? t????? ??aµµ?? ??at? de?
    e??a? a???ß??, e??a? d?s???? ?a efa?µ?ste? µe
    s???pe?a ?a? d?s???? ?a s??t????e?.
  • p??s?µ???s? ????a d?e??et?µ???? blocks
  • if PixelColor RedColor then begin
  • statement1
  • statement2
  • ...
  • end

21
S??? ???????S ?O????
  • ???s? ????? block begin ?a? end
  • if PixelColor RedColor then
  • begin
  • statement1
  • statement2
  • ...
  • end
  • ??t? t? st?? e??a? ?a??, s?µµ??f??eta? st?
    ßas??? a??? t?? s?st?? µ??f?p???s??, µp??e?
    e????a ?a efa?µ?s?e? µe s???pe?a ?a? de
    d?µ?????e? p??ß??µata s??t???s??.

22
??????? ???O? ???G???
  • ?p?fe??ete ta ?e??? begin end ????? es???
  • ?p?fe??ete t? d?p?? es??? µe begin ?a? end

23
??????? ???O? ???G???
  • ???s?µ?p??e?te ?e??? ??aµµ?? µeta?? pa?a???f??
    µe???? blocks de d?a???????ta? µe ?e??? begin ?a?
    end. ??a ?????? block p??pe? ?a a?t?µet?p??eta?
    ?p?? ?? pa????af?? se ??a s?µßat??? ?e?µe??.
  • ???f?p??e?te µe s???pe?a ta block p??
    ap?te????ta? ap? µ?a µ??? e?t???.

24
??????? ???O? ???G???
  • St?? ??a block µ?a? e?t????

25
??????? ???O? ???G???
  • St?? pe??p???e? e?f??se?? d?a???e?ste t??
    s?????e? se ?e????st?? ??aµµ??
  • if ( ( '0' lt InChar and InChar lt '9' ) or
  • ( 'a' lt InChar and InChar lt 'z' ) or
  • ( 'A' lt InChar and InChar lt 'Z' ) ) then
  • ...
  • ?p?fe??ete e?t???? t?p?? goto

26
??????? ?????O?
  • ?e?????ste t? µ???? t?? e?t???? t? p??? st??? 80
    ?a?a?t??e?
  • ??aµµ?? µe?a??te?e? ap? 80 ?a?a?t??e? e??a?
    d?s???a a?a???s?µe?
  • t? ???? t?? 80 ?a?a?t???? ap?t??pe? ta p????
    ep?peda eµf??e?s??
  • ??aµµ?? µe?a??te?e? ap? 80 ?a?a?t??e? de ?????e
    se ?a?t? ?4
  • ???s?µ?p??e?te ?e?? ??a ?a ße?t???ete t??
    a?a???s?µ?t?ta t?? ??????? e?f??se??
  • ?a??de??µa µ? a?a???s?µ?? ??d??a
  • while(PathNameStartPathPosltgt'') and
    ((StartPathPos)ltlength(PathName)) do

27
??????? ?????O?
  • ???s?µ?p??e?te ?e?? ??a ?a ße?t???ete t??
    a?a???s?µ?t?ta t?? ??????? e?f??se??
  • ???s?µ?p??e?te ?e?? ??a ?a d?a?????ete ta ???µata
    µeta?? t???
  • ?a??de??µa a?a???s?µ?? ??d??a
  • while ( PathName StartPath Pos ltgt '' ) and
  • (( StartPath Pos ) lt length( PathName )) do
  • ???s?µ?p??e?te ?e?? ??a ?a ße?t???ete t??
    a?a???s?µ?t?ta a?af???? se st???e?a p??a?a

28
??????? ?????O?
  • ???s?µ?p??e?te ?e?? ??a ?a ße?t???ete t??
    a?a???s?µ?t?ta a?af???? se st???e?a p??a?a
  • ?a??de??µa µ? a?a???s?µ?? ??d??a
  • GrossRateCensusGroupID.Sex,CensusGroupID.AgeG
    roup
  • ?a??de??µa a?a???s?µ?? ??d??a
  • GrossRate Census GroupID .Sex, Census GroupID
    .AgeGroup
  • ???s?µ?p??e?te ?e?? ??a ?a ße?t???ete t??
    a?a???s?µ?t?ta ???sµ?t?? s??a?t?se??

29
??????? ?????O?
  • ???s?µ?p??e?te ?e?? ??a ?a ße?t???ete t??
    a?a???s?µ?t?ta ???sµ?t?? s??a?t?se??
  • ?a??de??µa µ? a?a???s?µ?? ??d??a
  • ReadEmployeeData(MaxEmps,EmpData,InputFile,EmpCoun
    t,InputError)
  • ?a??de??µa µ? a?a???s?µ?? ??d??a
  • GetCensus( InputFile, EmpCount, EmpData, MaxEmps,
    InputError )
  • St????s? e?t???? p?? s?et????ta? µeta?? t???
  • ?a??de??µa ????? st????s??
  • EmployeeName InputName
  • EmployeeSalary InputSalary
  • EmployeeBirthdate InputBirthdate

30
??????? ?????O?
  • St????s? e?t???? p?? s?et????ta? µeta?? t???
  • ?a??de??µa s?st?? st????s??
  • EmployeeName InputName
  • EmployeeSalary InputSalary
  • EmployeeBirthdate InputBirthdate
  • ?a??de??µa ????? st????s??
  • EmployeeName InputName
  • EmployeeAddress InputAddress
  • EmployeePhone InputPhone
  • BossTitle Title
  • BossDept Department

31
??????? ?????O?
  • St????s? e?t???? p?? s?et????ta? µeta?? t???
  • ?a??de??µa s?st?? st????s??
  • EmployeeName InputName
  • EmployeeAddress InputAddress
  • EmployeePhone InputPhone
  • BossTitle Title
  • BossDept Department
  • ???f?p???s? µ? ????????µ???? ??aµµ?? ?a ???ete
    eµfa??? t? ?t? ? e?t??? de? e??a? ????????µ???

32
??????? ?????O?
  • ?a?ade??µata eµfa??? µ? ????????µ???? ??aµµ??

33
??????? ?????O?
  • ???f?p???s? µ? ????????µ???? ??aµµ?? ?a
    d?at??e?te µa?? st???e?a t?? ??d??a p??
    s?et????ta? µeta?? t??? ?p?? p.?. a?af???? se
    st???e?a p??a?a, ???sµata s??a?t?se?? ?.a.
  • ?a??de??µa ??? ?a??? d?a????sµ?? ??aµµ??
  • CustomerBill PrevBalance( PaymentHistory
    CustomerID ) LateCharge(
  • PaymentHistory CustomerID )
  • ?a??de??µa s?st?? d?a????sµ?? ??aµµ??
  • CustomerBill PrevBalance( PaymentHistory
    CustomerID )
  • LateCharge( PaymentHistory CustomerID )

34
??????? ?????O?
  • ???f?p???s? µ? ????????µ???? ??aµµ??
    ???s?µ?p??e?te es??? ??a t? s????e?a ??aµµ??
    ???s?? s??a?t?se??
  • ?a??de??µa s?st?? d?a????sµ?? ??aµµ??
  • DrawLine( Window.North, Window.South,
    Window.East, Window.West,
  • CurrentWidth, CurrentAttribute )
  • SetFontAttributes( Font.FaceName, Font.Size,
    Font.Bold, Font.Italic,
  • Font.SyntheticAttribute FontID .Underline,
  • Font.SyntheticAttribute FontID .Strikeout
    )
  • ? ??a ?a t???s??µe t? ???µa t?? s????t?s??
  • DrawLine( Window.North, Window.South,
    Window.East, Window.West,
  • CurrentWidth, CurrentAttribute )
  • SetFontAttributes( Font.FaceName, Font.Size,
    Font.Bold, Font.Italic, Font.SyntheticAttrib
    ute FontID .Underline,
  • Font.SyntheticAttribute FontID .Strikeout
    )

35
??????? ?????O?
  • ???f?p???s? µ? ????????µ???? ??aµµ?? ???te es???
    se s????e?a e?t???? e??????
  • ?a??de??µa
  • while ( PathName StartPath Pos ! '' )
  • ( ( StartPath Pos ) lt length( PathName ) )
  • ...
  • for ( RecNum Employee.Rec.Start
    Employee.Rec.Offset
  • RecNum lt Employee.Rec.Start
    Employee.Rec.Offset Employee.NumRecs RecNum
    )
  • ...

36
??????? ?????O?
  • ???f?p???s? µ? ????????µ???? ??aµµ?? ???te es???
    se s????e?a e?t???? a???es?? p??a ap? t?? te?est?
    a???es??
  • ?a??de??µa µ? s?st?? d?a????sµ?? ??aµµ??
  • CustomerPurchases CustomerPurchases
    CustomerSales( CustomerID )
  • CustomerBill CustomerBill
    CustomerPurchases
  • TotalCustomerBill CustomerBill
    PreviousBalance( CustomerID )
  • LateCharge( CustomerID )
  • CustomerRating Rating( CustomerID,
    TotalCustomerBill )
  • ?a??de??µa µ? s?st?? d?a????sµ?? ??aµµ??
  • CustomerPurchases CustomerPurchases
    CustomerSales( CustomerID )
  • CustomerBill CustomerBill
    CustomerPurchases
  • TotalCustomerBill CustomerBill
    PreviousBalance( CustomerID )
  • LateCharge( CustomerID )
  • CustomerRating Rating( CustomerID,
    TotalCustomerBill )

37
??????? ?????O?
  • ???ete µ??? µ?a e?t??? a?? ??aµµ?
  • ?a ap?fe??ete ta side effects (pa??p?e??e?
    ep?pt?se?? t?? e?t??es?? µ?a? e?t????)
  • ?a??de??µa µ? ap?f???? t?? side effects
  • printf( "d d \n", n, n 2 )
  • ?a??de??µa s??ta??? ap?f???? t?? side effects
  • n
  • printf( "d d \n", n, n 2 )
  • ???a?? pa??de??µa µ? ap?f???? t?? side effects
  • strcpy( char t, char s )
  • while ( t s )

38
??????? ?????O?
  • ???a?? pa??de??µa µ? ap?f???? t?? side effects
  • strcpy( char t, char s )
  • do
  • t
  • s
  • t s
  • while ( t ! \0 )

39
??????? ?????O?
  • ???ta?? d???se?? ?a ???s?µ?p??e?te st????s?
  • int SortBoundary
  • int InsertPos
  • SORT_STRING InsertVal
  • SORT_STRING LowerBoundary
  • ???ta?? d???se?? µ??? µ?a d???s? a?? ??aµµ?
  • int RowIdx, ColIdx COLOR PreviousScreen,
    CurrentScreen, NextScreen POINT PreviousTop,
    PreviousBottom, CurrentTop, CurrentBottom,
    NextTop, NextBottom FONT PreviousFace,
    CurrentFace, NextFace COLOR Choices NUM_COLORS

40
??????? ?????O?
  • ???ta?? d???se?? ß??ete t?? d???se?? se µ?a
    ?????? se??? p.?. a?? t?p? ? a?faß?t??? (??e?
    p???? d???e??)
  • ???ta?? d???se?? st?? d???se?? µetaß??t?? de??t?
    ß??ete t? aste???? de??? t?? t?p?? e?t?? ?a? a?
    ????µe pe??ss?te?a t?? e??? aste????a
  • EMP_LIST Employees
  • FILE InputFile

41
???????????? ??????
  • Code Complete A Practical Handbook of Software
    Construction
  • Steve McConnell, Microsoft Press, 1993
Write a Comment
User Comments (0)
About PowerShow.com