SlideShare a Scribd company logo
1 of 110
Download to read offline
Chapter 1
Software Development and
Analysis of the Problem
                             Mr.Warawut Khangkhan
                Twitter: http://twitter.com/awarawut
     Facebook: http://www.facebook.com/AjWarawut
                      E-Mail: awarawut@hotmail.com
                                Mobile: 083-0698-410
Contents
                                               F

                   F
           F             F




                                      Chapter 1 Software Development and
               Mr.Warawut Khangkhan   Analysis of the Problem              2
F




                       Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem                  3
F
                                                           F
                  F
        F F
                                                                      F
          F F                                          F                      F
F   F                                             F               F
              F

                                             Chapter 1 Software Development and
                      Mr.Warawut Khangkhan   Analysis of the Problem              4
(STEPS IN PROGRAM DEVELOPMENT)




                              Chapter 1 Software Development and
       Mr.Warawut Khangkhan   Analysis of the Problem              5
1.                  (Define the Problem)
2.    F                             F           (Outline the
     Solution)
3.                     (Develop and Algorithm)
4.                        F                    (Test the
   Algorithm for Correctness)
5.            (Programming)
6.                     (Testing)
7.                                               (Document and
     Maintain the Program)
                   Mr.Warawut Khangkhan
                                          Chapter 1 Software Development and
                                          Analysis of the Problem              6
1.
(Define the Problem)
  Inputs
  Outputs
  Processing




                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              7
2. F                                                              F
(Outline the Solution)
                F                  F                                        (
                    )
        F                                          F                  F                     F
  ◦                                    F
  ◦ F                        F                 F   (Subtask)
  ◦ F                   F        F F
  ◦         F       F              F
  ◦                      F                 F
  ◦                     (Logic)
                                                       Chapter 1 Software Development and
                            Mr.Warawut Khangkhan       Analysis of the Problem                  8
3.
(Develop and Algorithm)
         F                                                    F

     F (Pseudo Code)
      F F            F




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              9
4.                       F
(Test the Algorithm for Correctness)


     F        F                                   F




                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              10
5.
(Programming)
           F            F      F
   F             (    )
       F        (High Language)
             F C, PASCAL    F




                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              11
6.
(Testing)
      F     F
    F     F   F                  F

     ◦        (Syntax Errors)
     ◦    (Logic Errors)
     F        F                          F                                        F
          F                          F

                                             Chapter 1 Software Development and
                  Mr.Warawut Khangkhan       Analysis of the Problem                  12
7.
(Document and Maintain the Program)
                                           F                   F
                                   F                                        F
                                       F
     ◦       (External Document) F                                      F
         F F                     F
     ◦    (Internal Document)

                              F


                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem                      13
F




Chapter 1 Software Development and Analysis of the Problem
                                                         Mr.Warawut Khangkhan       14
F
                                                   F2
                                      F                     F                F
                        F                                           F
F               F
        F                                 F                              F              F
    F               F             F                     F       F
            F

                                                   Chapter 1 Software Development and
                            Mr.Warawut Khangkhan   Analysis of the Problem                  15
F               F




                       Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem              16
F              F
1.   F               F
2.   FF
3.   F                              F
         F




                                        Chapter 1 Software Development and
             Mr.Warawut Khangkhan       Analysis of the Problem              17
1.                     F                  F
         F                 F F
             F                    F
                                      F                                 F
 (   F           F F                          F             F          F )




                                                   Chapter 1 Software Development and
                            Mr.Warawut Khangkhan   Analysis of the Problem              18
2.                 FF
       F       F                        F             F
                        F                                 F             F3

 ◦ F       F                        F
 ◦ F       F F F
 ◦ F



                                               Chapter 1 Software Development and
                        Mr.Warawut Khangkhan   Analysis of the Problem              19
F             F                    F
    F   F
            F a = 20 b = 15 c = 5
                 10
              F                   F




                                         Chapter 1 Software Development and
                  Mr.Warawut Khangkhan   Analysis of the Problem              20
F                       F F F
                          F           F                     F       F
                                            F                               F
            F       F
                                                                                        n
                F                     F F                               F
        F               F F
                                2                 F F                               F
    F                                              F F                          2

                                                       Chapter 1 Software Development and
                                Mr.Warawut Khangkhan   Analysis of the Problem              21
F
    F F            F                                            F       F
                                                            F F F F F
          F                           F            F            F F
                            F          F F
                                       (Base)
                                      (Height)

              ½                 0.5                    F            (Constant)
    F          F       F
                                          F = ½ x base x height
                                                  Chapter 1 Software Development and
                           Mr.Warawut Khangkhan   Analysis of the Problem              22
3.               F                                        F

     F                         F                      F               F
             F             F       F             F                              F         F
                     FF                F F
         F                                                       FF         F




                                                     Chapter 1 Software Development and
                          Mr.Warawut Khangkhan       Analysis of the Problem                  23
F                                F                F
F

        F         F-
        F F   -          F                    F
                                                                     F             F
2
        F                    F            -               F                  F F
                                                                         F
              =                                   +
                                          Chapter 1 Software Development and
                   Mr.Warawut Khangkhan   Analysis of the Problem                      24
F                                 F              F
     F
1.                F             F-
2.                F F       -          F F F                           F
             F      FF                                        F
                         F F      F
             area = ½ x base x height
3.                  F          F    - F                                    F
                  F          F

                                                Chapter 1 Software Development and
                         Mr.Warawut Khangkhan   Analysis of the Problem              25
Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem              26
Algorithm
                      F                                                     F           F       F
                    F
                                                          F            F            F
                                       F                                                                F
                                   F              F                             F           F       F
                               F



Chapter 1 Software Development and Analysis of the Problem
                                                         Mr.Warawut Khangkhan                               27
F
         F
1.           F       F                    F           F                F        F
2.           F                        F                            F           F F
     F
3.                                                        F                          F
                 F                F
                                              F F
4.           F

                                                    Chapter 1 Software Development and
                     Mr.Warawut Khangkhan           Analysis of the Problem              28
Algorithm
Algorithm <                       >
1. ……………..
2. ……………..
3. …………….
END



                                Chapter 1 Software Development and
         Mr.Warawut Khangkhan   Analysis of the Problem              29
Example Algorithm
             F
1.
2.   F           F
3.                             F
4.
5.       F
6.
7.           3
                                            Chapter 1 Software Development and
                     Mr.Warawut Khangkhan   Analysis of the Problem              30
Example Algorithm (Cont.)
Algorithm F
1.      F   F                                                                        F

2.                   F              1       F
3.               F                                                             F
4.           F           F
5.   F F F                      F               F                      F F
6.
                                                    Chapter 1 Software Development and
                             Mr.Warawut Khangkhan   Analysis of the Problem              31
Example Algorithm (Cont.)
Algorithm
1.  F   (                          F                  )
                                                      F
2.           F
3.                  F                         F              F
4.   F     F F
5.       F F F
6.


                                        Chapter 1 Software Development and
                 Mr.Warawut Khangkhan   Analysis of the Problem              32
Example Algorithm (Cont.)
Algorithm
1.              F
2.   F                      2 F
3.     F 2 F
4.      F         2 F
5.        F F ¾                F
6.          F F
7.


                                               Chapter 1 Software Development and
                        Mr.Warawut Khangkhan   Analysis of the Problem              33
Example Algorithm (Cont.)
                 F
turn on calculator
clear calculator
repeat the following instructions
    key in baht amount
    key in decimal point (.)
    key in satang amount
    press addition(+) key
until all prices have been entered
write down total price
turn off calculator
                                        Chapter 1 Software Development and
                 Mr.Warawut Khangkhan   Analysis of the Problem              34
(Cont.)
                 2
        (Pseudo Code)
     (Flowchart)




                                 Chapter 1 Software Development and
          Mr.Warawut Khangkhan   Analysis of the Problem              35
Pseudo Code
     F
             F
         F                                                                   F




                                        Chapter 1 Software Development and
                 Mr.Warawut Khangkhan   Analysis of the Problem                  36
F
1.   F                       (Statement) F                                        F
                                F F
2.             F
3.        F F F F                    F
     (Keywords) F F                                                           F
               F  F                                                F
       FF F

                                         Chapter 1 Software Development and
              Mr.Warawut Khangkhan       Analysis of the Problem                  37
F (Cont.)
4.       F                       F                                          F
                 F                                                               F
5.           F                       F                              F           F F
                                     F F                                         F
     F               F                     F                            F




                                                Chapter 1 Software Development and
                         Mr.Warawut Khangkhan   Analysis of the Problem               38
6                                                            F
(Six Basic Computer Operations)
1.       F                F                  F
2.       F                                       F F
3.       F                               F
4.       F                          F                    F
5.       F
     F
6.       F                                        F

                                        Chapter 1 Software Development and
             Mr.Warawut Khangkhan       Analysis of the Problem                  39
F                                         F                     F
         F                   F               (               ) F                             F           F        F
     F                                           F            FF                                              F       F
 F                   F               F                           F           F                       F
                 F                       F                             F    F   F
             F                   F                       F                 read get                                       F
                                             F
◦ read F                                                       F                     F                   FF
◦ get F                                              F                           F               F
                                                                           Chapter 1 Software Development and
                                             Mr.Warawut Khangkhan          Analysis of the Problem                            40
F              F                         F              F
read studentName
get systemDate
read number1, number2
get taxCode




                                  Chapter 1 Software Development and
           Mr.Warawut Khangkhan   Analysis of the Problem              41
F                                             F F
              F F                          print, write, put,
output       display
◦ print F               F              F                                   F
◦ write F              F    F                                                   F
◦ put, output         display                      F                   F            F




                                           Chapter 1 Software Development and
                Mr.Warawut Khangkhan       Analysis of the Problem                      42
F               F                                             F F
print “Program Completed”
write customer record to master file
put name, address and postcode
output totalTax
display “End of data”



                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              43
F                                         F F (Cont.)
    prompt             F                    F              F             F
    get,           F                             F                           F
F F      F
promt for studentMark
get studentMark



                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem                      44
F                                    F
        F       F
◦           F+ F                      (add)
◦           F– F                    (subtract)
◦           F* F                     (multiply)
◦           F/ F                    (divide)
◦           F() F                                             /
         F                                 F         F compute
calculate
                                           Chapter 1 Software Development and
                    Mr.Warawut Khangkhan   Analysis of the Problem              45
F                F                                       F
divide totalMarks by studentCount
salesTax costPrice * 0.10
compute C = (F – 32) * 5 / 9




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              46
F                                 F                      F
                     F3
1.   F                initialize                           F set                         F
         F       F
2.   F                   F                 =
             F            F
3.   F                   store                              F           F


                                                    Chapter 1 Software Development and
                             Mr.Warawut Khangkhan   Analysis of the Problem                  47
F               F                                    F
 F
initialize totalPrice to zero
set studentCount to 0
totalPrice = costPrice + salesTax
totalPrice      costPrice + salesTax
store customerId in lastCustomerID



                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              48
F
     F
 F if…then…else                              F      end if
if employeeStatus is partTime then
    add 1 to partTimeCount
else
    add 1 to fullTimeCount
end if


                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              49
F                                        F
      F dowhile…enddo
    repeat…until
dowhile file_flag <> “eof”
   read student record
   print studentName, address to report
   add 1 to studentTotal
enddo
eof – End Of File
                                      Chapter 1 Software Development and
               Mr.Warawut Khangkhan   Analysis of the Problem              50
F                                3
(The Three Basic Control Structures)
            (Sequence)
                (Selection)
           (Repetition)




                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              51
(Sequence Format)
statement a
statement b
statement c
    :
    :



                                     Chapter 1 Software Development and
              Mr.Warawut Khangkhan   Analysis of the Problem              52
F
add 1 to pageCount
print heading line1
print heading line2
set lineCount to zero
read customer record



                                  Chapter 1 Software Development and
           Mr.Warawut Khangkhan   Analysis of the Problem              53
(Selection Format)
if condition p is true then
    statement(s) in true case
else
    statement(s) in false case
end if



                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              54
F
(Simple IF Statement)
if accountBalance < 300000 then
    serviceCharge = 5.00
else
    serviceCharge = 2.00
end if



                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              55
F
(Null False Branch)
 if employeeStatus = partTime then
     add 1 to partTimeCount
 end if




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              56
F
(Combined IF Statement 1)
if employeeStatus = partTime
    and employeeGender = female then
       add 1 to partTimeCount
end if




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              57
F
(Combined IF Statement 2)
if (recordCode = “23” or updateCode
  = delete)
    and accountBalance = zero then
       delete customer record
end if




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              58
F
(Combined IF Statement 3)
if not (recordCode = “23”
    and updateCode = delete) then
       update customer record
end if




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              59
F
(Nested IF Statement 1)
if recordCode = “A” then
    increment counter_A
else
    if recordCode = “B” then
        increment counter_B
    else
        if recordCode = “C” then
             increment counter_C
        else
             increment errorCounter
        end if
    end if
end if
                                             Chapter 1 Software Development and
                      Mr.Warawut Khangkhan   Analysis of the Problem              60
F
(Nested IF Statement 2)
if employeeStatus = partTime then
    if employeeGender = female then
        if employeeAge > 30 then
             add 1 to matureFemaleEmployee
        else
             add 1 to youngFemaleEmployee
        end if
    else
        add 1 to maleEmployee
    end if
else
    add 1 to fullTimeEmployee
end if
                                            Chapter 1 Software Development and
                     Mr.Warawut Khangkhan   Analysis of the Problem              61
(Repetition Format)
dowhile

dowhile condition p is true
   statement block
enddo



                                  Chapter 1 Software Development and
           Mr.Warawut Khangkhan   Analysis of the Problem              62
(Repetition Format) (Cont.)
repeat…until

repeat
   statement
   statement
       :
       :
until condition is true
                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              63
F dowhile loop 1
set studentTotal to zero
dowhile studentTatal < 50
   read student record
   print studentName, address to
 report
   add 1 to studentTotal
enddo
                                  Chapter 1 Software Development and
           Mr.Warawut Khangkhan   Analysis of the Problem              64
F dowhile loop 2
Process Student_record
   set studentCount to zero
   read student record
   dowhile studentNumber not equal 999
       write student record
       increment studentCount
       read student record
   enddo
   print studentCount
end                        Chapter 1 Software Development and
                      Mr.Warawut Khangkhan   Analysis of the Problem   65
F repeat … until loop
Process Student_record
   set studentCount to zero
   repeat
       read student record
       if studentNumber not equal 999
           write student record
           increment studentCount
       end if
   until studentNumber = 99
   print studentCount                 Chapter 1 Software Development and
                 Mr.Warawut Khangkhan Analysis of the Problem              66
end
(Flowchart)

         F                 F               F                   F

 F                                 F                                                    F       F
     F                                 F            F                  FF
                                               F                                            F       F
                       F       F


                                                   Chapter 1 Software Development and
             Mr.Warawut Khangkhan                  Analysis of the Problem                      67
F
1.       F                                   F                        F
     F
2.                                                                           F

3.                      F                                             F F




                                        Chapter 1 Software Development and
                 Mr.Warawut Khangkhan   Analysis of the Problem              68
F     2        F
(System Flowchart)
  (Program Flowchart)




                         Chapter 1 Software Development and
  Mr.Warawut Khangkhan   Analysis of the Problem              69
(System Flowchart)
F
        F       F            F                   F                      F
            F                               F                    F F
                         F          F F                      F
                                                         F                  F         F
    F               F                                                           F



                                                        Chapter 1 Software Development and
                                 Mr.Warawut Khangkhan   Analysis of the Problem              70
Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem              71
Mr.Warawut Khangkhan   72
(Program Flowchart)
                               F
F                                  F
    F




                               Chapter 1 Software Development and
        Mr.Warawut Khangkhan   Analysis of the Problem              73
Mr.Warawut Khangkhan   74
F
    Terminal                                              F START
       STOP F                                       F F
    Manual Input                                F
     F         F                F                               F
    Monitor (Output)
             F                         F                  F
               F
    Input/Output Data                                               F
          F                                F
                                    Chapter 1 Software Development and
         Mr.Warawut Khangkhan       Analysis of the Problem              75
F                  (Cont.)
    Process
      F                                -    F           F
    Decision                       F             F      F
    2            (True)                         (False)
                      (?) F                                      F F
    Magnetic Disk F F                              F
     F
    Comment F          F
                  F F                                       F
                                Chapter 1 Software Development and
         Mr.Warawut Khangkhan   Analysis of the Problem                76
F               (Cont.)
    Preparation (          ) F                                        F
         F                     F F
    Sobroutine processing (
      F F ) F                                                F F
                             F                                F
           F


    Document (              )                               /             F
     F
                                 Chapter 1 Software Development and
          Mr.Warawut Khangkhan   Analysis of the Problem                      77
F                  (Cont.)
    Connector F                      F    F          F
                                 F

             F F
    Off-Page Connector F                      F
         F F         F

    Flow Direction Lines
    (    F               )

                                Chapter 1 Software Development and
         Mr.Warawut Khangkhan   Analysis of the Problem              78
1.       F               F       F                                                   F
2.                   F                                                    F
                 F             F
3.                           Flowchart                                F        F
             F
4.               Flowchart                 F
     F

                                                    Chapter 1 Software Development and
                             Mr.Warawut Khangkhan   Analysis of the Problem              79
(Cont.)
5.                    F        F F                            F                   F
              F            F                      F                F
6.                                       F
     Flowchart F




                                             Chapter 1 Software Development and
                  Mr.Warawut Khangkhan       Analysis of the Problem                  80
(Sequence)
    (Selection)
(Repetition)




                        Chapter 1 Software Development and
 Mr.Warawut Khangkhan   Analysis of the Problem              81
F
        F


            F
F
                                       Chapter 1 Software Development and
                Mr.Warawut Khangkhan   Analysis of the Problem              82
F

Algorithm
1. F           F   F      base
   height
2.                   (area)
   area = 0.5 * base * height
3.                 (area)


                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              83
F

Algorithm
get base, height
compute area = 0.5 * base * height
display area




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              84
F

              Start



        base, height


    area = 0.5 * base * height


                 area


                 Stop
                                Chapter 1 Software Development and
         Mr.Warawut Khangkhan   Analysis of the Problem              85
F
    F F F   F       (salary) F
             (tax) 10% F
      F F salary tax




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              86
F
Algorithm      F F salary tax
1. F         (Salary)
2.                   tax = salary * 0.1
3.
---------------------------------
 get salary
 compute tax = salary * 0.1
 display salary, tax
                                       Chapter 1 Software Development and
                Mr.Warawut Khangkhan   Analysis of the Problem              87
F
         Start



        salary


    tax = salary * 0.1


    print salary, tax


          Stop
                                 Chapter 1 Software Development and
          Mr.Warawut Khangkhan   Analysis of the Problem              88
Workshop:
                   F                      Y = 2X * 2




                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              89
F
            F           F
                F
                    F
    F   F F     (True)
      (False) F
F   F               F


                                                   Chapter 1 Software Development and
                            Mr.Warawut Khangkhan   Analysis of the Problem              90
(Cont.)




                                 Chapter 1 Software Development and
          Mr.Warawut Khangkhan   Analysis of the Problem              91
Workshop:

                                                                F                            F
100 F               F                   F                           F 100              F F
        F               F           F           100 F                 F            F
                F           F 100                           F                F
            F                               F




                                                      Chapter 1 Software Development and
                               Mr.Warawut Khangkhan   Analysis of the Problem                    92
Workshop:

                                                                                 F                   2 F
                 F         F F               F                               F                   F
         F            F                          F                F                  F       F
 F                   F F             F                                 FF F                          F
                            F F                          F              F                F               F
     F                       F F                     F                                                       F
             F                           F                               F

                                                             Chapter 1 Software Development and
                           Mr.Warawut Khangkhan              Analysis of the Problem                             93
(Cont.)
                                                          F
      F




                                 Chapter 1 Software Development and
          Mr.Warawut Khangkhan   Analysis of the Problem              94
(Cont.)
    Start

                                                                      1
 name, score

                                                                    Stop

  score > 0     Y


    N
                             Y                          N
                                    score > 49
Display Error
                    Display Pass                   Display Not Pass

      1
                         1                                     1
                                               Chapter 1 Software Development and
                        Mr.Warawut Khangkhan   Analysis of the Problem              95
Workshop:
                                                                       F
                                                                                                                   F               2 F
                                                 F                                 F                 F F
     F           F                                                 F                   F                               F
 F                       F       F                             F                               F F                         F
         F F F                           F                                                           F F                            F
             F                               F       F                     F                                       F F                  F
                             F                             F                               F               F                   F
 F                       F           F                                                           F                                          F
                     F                                                         F                               F
                                                                                       Chapter 1 Software Development and
                                                         Mr.Warawut Khangkhan          Analysis of the Problem                              96
Workshop:
                                           F
                                                                        F

      80        100                A
      70        79                 B
      60        69                 C
      50        59                 D
      0        49                  F
           F               F   F                           F      F
                   F                           F                            ,
                                                   F
                       F                                        F F F 0 100
  F            F                       F               F       Out of range     97
F                                                               F
                   F                             F
(True)        (False) F                    F




                                    Chapter 1 Software Development and
             Mr.Warawut Khangkhan   Analysis of the Problem              98
( F)




                       Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem              99
(Cont.)
 Start                N=?                        N = 55
                      I=?                        I = 11
 N=0
 I=1                  N=?                        N = 15
                      I=5                        I=5
          N
I <= 10

 Y
                    Display I
N=N+I

                      Stop
I=I+1



                                 Chapter 1 Software Development and
          Mr.Warawut Khangkhan   Analysis of the Problem              100
(Cont.)
     Start


     N=0
     I=1


    N=N+I


    I=I+1


Y             N         Display I                   Stop
    I <= 10



                                         Chapter 1 Software Development and
                  Mr.Warawut Khangkhan   Analysis of the Problem              101
F
                   F F
F       F                                       F F
                           F F




                             Chapter 1 Software Development and
    Mr.Warawut Khangkhan     Analysis of the Problem              102
F
Algorithm F F 0 4
1.          I F F 0
2.            I
   2.1 F I <= 4 F
             F F I
         I=I+1(      F F                                      I         1)
                   2
   2.2 F I > 4 F

                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem               103
F
Algorithm F F 0                        4
set i to 0
dowhile i <= 4 then
    print i
    add 1 to i
enddo



                                   Chapter 1 Software Development and
            Mr.Warawut Khangkhan   Analysis of the Problem              104
Start


  I = 0


                   N
 I <= 4

  Y
                                     Stop
 Print I


I = I + 1
                        Chapter 1 Software Development and
 Mr.Warawut Khangkhan   Analysis of the Problem              105
Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem              106
F                F F
 F 1     F                                                          F
Do while
                           F
   F




                               Chapter 1 Software Development and
       Mr.Warawut Khangkhan    Analysis of the Problem                  107
Chapter 1 Software Development and
Mr.Warawut Khangkhan   Analysis of the Problem              108
Workshop:
                           F                               1-10                        F
                                                       F                           F
                           F                       F                                       1-
 10           F                                                        F
      F                         F
                                F                                 F            F
          F           F   F F 2 – 12 F
                  F        F      F                                   Error”

                                                 Chapter 1 Software Development and
                          Mr.Warawut Khangkhan   Analysis of the Problem                        109
Homework:
1.                      F                            F                   F
     F          F           F         F      F

2.                              F F                                  F
             F 1 – 50
3.              F 2.                                     F     , F
         F                                       F

                                          Chapter 1 Software Development and
               Mr.Warawut Khangkhan       Analysis of the Problem              110

More Related Content

Similar to การพัฒนาซอฟต์แวร์และวิเคราะห์การแก้ปัญหา

Management Information System 4
Management Information System 4Management Information System 4
Management Information System 4Warawut
 
Database Design
Database DesignDatabase Design
Database DesignWarawut
 
Ch01 introduction-web
Ch01 introduction-webCh01 introduction-web
Ch01 introduction-webWarawut
 
Function C
Function CFunction C
Function CWarawut
 
การใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นการใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นKanda Runapongsa Saikaew
 
Business Computer Project 1
Business Computer Project 1Business Computer Project 1
Business Computer Project 1Warawut
 
Chapter 2 Strategy & Information System
Chapter 2 Strategy & Information SystemChapter 2 Strategy & Information System
Chapter 2 Strategy & Information SystemWarawut
 
หลักการออกแบบและพัฒนาเว็บไซท์
หลักการออกแบบและพัฒนาเว็บไซท์หลักการออกแบบและพัฒนาเว็บไซท์
หลักการออกแบบและพัฒนาเว็บไซท์Warawut
 
Chapter 1 Organization & MIS
Chapter 1 Organization & MISChapter 1 Organization & MIS
Chapter 1 Organization & MISWarawut
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4Warawut
 
Management Information System 5
Management Information System 5Management Information System 5
Management Information System 5Warawut
 
Dreamweaver8
Dreamweaver8Dreamweaver8
Dreamweaver8kruple
 
การจัดการเรียนการสอน
การจัดการเรียนการสอนการจัดการเรียนการสอน
การจัดการเรียนการสอนAnanpha Dear
 
การสืบค้นขั้นสูง
การสืบค้นขั้นสูงการสืบค้นขั้นสูง
การสืบค้นขั้นสูงfangwittayayon
 
Display Table Demo
Display Table DemoDisplay Table Demo
Display Table DemoWarawut
 

Similar to การพัฒนาซอฟต์แวร์และวิเคราะห์การแก้ปัญหา (17)

Management Information System 4
Management Information System 4Management Information System 4
Management Information System 4
 
Database Design
Database DesignDatabase Design
Database Design
 
Flash unit 1
Flash unit 1Flash unit 1
Flash unit 1
 
Ch01 introduction-web
Ch01 introduction-webCh01 introduction-web
Ch01 introduction-web
 
Function C
Function CFunction C
Function C
 
การใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นการใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้น
 
Business Computer Project 1
Business Computer Project 1Business Computer Project 1
Business Computer Project 1
 
Chapter 2 Strategy & Information System
Chapter 2 Strategy & Information SystemChapter 2 Strategy & Information System
Chapter 2 Strategy & Information System
 
หลักการออกแบบและพัฒนาเว็บไซท์
หลักการออกแบบและพัฒนาเว็บไซท์หลักการออกแบบและพัฒนาเว็บไซท์
หลักการออกแบบและพัฒนาเว็บไซท์
 
Seminar It
Seminar ItSeminar It
Seminar It
 
Chapter 1 Organization & MIS
Chapter 1 Organization & MISChapter 1 Organization & MIS
Chapter 1 Organization & MIS
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4
 
Management Information System 5
Management Information System 5Management Information System 5
Management Information System 5
 
Dreamweaver8
Dreamweaver8Dreamweaver8
Dreamweaver8
 
การจัดการเรียนการสอน
การจัดการเรียนการสอนการจัดการเรียนการสอน
การจัดการเรียนการสอน
 
การสืบค้นขั้นสูง
การสืบค้นขั้นสูงการสืบค้นขั้นสูง
การสืบค้นขั้นสูง
 
Display Table Demo
Display Table DemoDisplay Table Demo
Display Table Demo
 

More from Warawut

Database design
Database designDatabase design
Database designWarawut
 
Object-Oriented Programming 10
Object-Oriented Programming 10Object-Oriented Programming 10
Object-Oriented Programming 10Warawut
 
Object-Oriented Programming 9
Object-Oriented Programming 9Object-Oriented Programming 9
Object-Oriented Programming 9Warawut
 
Object-Oriented Programming 8
Object-Oriented Programming 8Object-Oriented Programming 8
Object-Oriented Programming 8Warawut
 
Object-Oriented Programming 7
Object-Oriented Programming 7Object-Oriented Programming 7
Object-Oriented Programming 7Warawut
 
Management Information System 6
Management Information System 6Management Information System 6
Management Information System 6Warawut
 
Object-Oriented Programming 5
Object-Oriented Programming 5Object-Oriented Programming 5
Object-Oriented Programming 5Warawut
 
Business Computer Project 3
Business Computer Project 3Business Computer Project 3
Business Computer Project 3Warawut
 
Management Information System 3
Management Information System 3Management Information System 3
Management Information System 3Warawut
 
Business Computer Project 2
Business Computer Project 2Business Computer Project 2
Business Computer Project 2Warawut
 
Object-Oriented Programming 4
Object-Oriented Programming 4Object-Oriented Programming 4
Object-Oriented Programming 4Warawut
 
Object-Oriented Programming 3
Object-Oriented Programming 3Object-Oriented Programming 3
Object-Oriented Programming 3Warawut
 
Object-Oriented Programming 2
Object-Oriented Programming 2Object-Oriented Programming 2
Object-Oriented Programming 2Warawut
 
Object-Oriented Programming 1
Object-Oriented Programming 1Object-Oriented Programming 1
Object-Oriented Programming 1Warawut
 
Upload File
Upload FileUpload File
Upload FileWarawut
 
Session and Cookie
Session and CookieSession and Cookie
Session and CookieWarawut
 
Form Validation
Form ValidationForm Validation
Form ValidationWarawut
 
Tips & Track
Tips & TrackTips & Track
Tips & TrackWarawut
 
Edit & Delete Data
Edit & Delete DataEdit & Delete Data
Edit & Delete DataWarawut
 

More from Warawut (20)

Database design
Database designDatabase design
Database design
 
Object-Oriented Programming 10
Object-Oriented Programming 10Object-Oriented Programming 10
Object-Oriented Programming 10
 
Object-Oriented Programming 9
Object-Oriented Programming 9Object-Oriented Programming 9
Object-Oriented Programming 9
 
Object-Oriented Programming 8
Object-Oriented Programming 8Object-Oriented Programming 8
Object-Oriented Programming 8
 
Object-Oriented Programming 7
Object-Oriented Programming 7Object-Oriented Programming 7
Object-Oriented Programming 7
 
Management Information System 6
Management Information System 6Management Information System 6
Management Information System 6
 
Object-Oriented Programming 5
Object-Oriented Programming 5Object-Oriented Programming 5
Object-Oriented Programming 5
 
Business Computer Project 3
Business Computer Project 3Business Computer Project 3
Business Computer Project 3
 
Management Information System 3
Management Information System 3Management Information System 3
Management Information System 3
 
Business Computer Project 2
Business Computer Project 2Business Computer Project 2
Business Computer Project 2
 
Object-Oriented Programming 4
Object-Oriented Programming 4Object-Oriented Programming 4
Object-Oriented Programming 4
 
Object-Oriented Programming 3
Object-Oriented Programming 3Object-Oriented Programming 3
Object-Oriented Programming 3
 
Object-Oriented Programming 2
Object-Oriented Programming 2Object-Oriented Programming 2
Object-Oriented Programming 2
 
Object-Oriented Programming 1
Object-Oriented Programming 1Object-Oriented Programming 1
Object-Oriented Programming 1
 
Upload File
Upload FileUpload File
Upload File
 
Login
LoginLogin
Login
 
Session and Cookie
Session and CookieSession and Cookie
Session and Cookie
 
Form Validation
Form ValidationForm Validation
Form Validation
 
Tips & Track
Tips & TrackTips & Track
Tips & Track
 
Edit & Delete Data
Edit & Delete DataEdit & Delete Data
Edit & Delete Data
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

การพัฒนาซอฟต์แวร์และวิเคราะห์การแก้ปัญหา

  • 1. Chapter 1 Software Development and Analysis of the Problem Mr.Warawut Khangkhan Twitter: http://twitter.com/awarawut Facebook: http://www.facebook.com/AjWarawut E-Mail: awarawut@hotmail.com Mobile: 083-0698-410
  • 2. Contents F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 2
  • 3. F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 3
  • 4. F F F F F F F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 4
  • 5. (STEPS IN PROGRAM DEVELOPMENT) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 5
  • 6. 1. (Define the Problem) 2. F F (Outline the Solution) 3. (Develop and Algorithm) 4. F (Test the Algorithm for Correctness) 5. (Programming) 6. (Testing) 7. (Document and Maintain the Program) Mr.Warawut Khangkhan Chapter 1 Software Development and Analysis of the Problem 6
  • 7. 1. (Define the Problem) Inputs Outputs Processing Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 7
  • 8. 2. F F (Outline the Solution) F F ( ) F F F F ◦ F ◦ F F F (Subtask) ◦ F F F F ◦ F F F ◦ F F ◦ (Logic) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 8
  • 9. 3. (Develop and Algorithm) F F F (Pseudo Code) F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 9
  • 10. 4. F (Test the Algorithm for Correctness) F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 10
  • 11. 5. (Programming) F F F F ( ) F (High Language) F C, PASCAL F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 11
  • 12. 6. (Testing) F F F F F F ◦ (Syntax Errors) ◦ (Logic Errors) F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 12
  • 13. 7. (Document and Maintain the Program) F F F F F ◦ (External Document) F F F F F ◦ (Internal Document) F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 13
  • 14. F Chapter 1 Software Development and Analysis of the Problem Mr.Warawut Khangkhan 14
  • 15. F F2 F F F F F F F F F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 15
  • 16. F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 16
  • 17. F F 1. F F 2. FF 3. F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 17
  • 18. 1. F F F F F F F F F ( F F F F F F ) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 18
  • 19. 2. FF F F F F F F F3 ◦ F F F ◦ F F F F ◦ F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 19
  • 20. F F F F F F a = 20 b = 15 c = 5 10 F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 20
  • 21. F F F F F F F F F F F F n F F F F F F F 2 F F F F F F 2 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 21
  • 22. F F F F F F F F F F F F F F F F F F F (Base) (Height) ½ 0.5 F (Constant) F F F F = ½ x base x height Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 22
  • 23. 3. F F F F F F F F F F F F FF F F F FF F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 23
  • 24. F F F F F F- F F - F F F F 2 F F - F F F F = + Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 24
  • 25. F F F F 1. F F- 2. F F - F F F F F FF F F F F area = ½ x base x height 3. F F - F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 25
  • 26. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 26
  • 27. Algorithm F F F F F F F F F F F F F F F F Chapter 1 Software Development and Analysis of the Problem Mr.Warawut Khangkhan 27
  • 28. F F 1. F F F F F F 2. F F F F F F 3. F F F F F F 4. F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 28
  • 29. Algorithm Algorithm < > 1. …………….. 2. …………….. 3. ……………. END Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 29
  • 30. Example Algorithm F 1. 2. F F 3. F 4. 5. F 6. 7. 3 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 30
  • 31. Example Algorithm (Cont.) Algorithm F 1. F F F 2. F 1 F 3. F F 4. F F 5. F F F F F F F 6. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 31
  • 32. Example Algorithm (Cont.) Algorithm 1. F ( F ) F 2. F 3. F F F 4. F F F 5. F F F 6. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 32
  • 33. Example Algorithm (Cont.) Algorithm 1. F 2. F 2 F 3. F 2 F 4. F 2 F 5. F F ¾ F 6. F F 7. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 33
  • 34. Example Algorithm (Cont.) F turn on calculator clear calculator repeat the following instructions key in baht amount key in decimal point (.) key in satang amount press addition(+) key until all prices have been entered write down total price turn off calculator Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 34
  • 35. (Cont.) 2 (Pseudo Code) (Flowchart) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 35
  • 36. Pseudo Code F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 36
  • 37. F 1. F (Statement) F F F F 2. F 3. F F F F F (Keywords) F F F F F F FF F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 37
  • 38. F (Cont.) 4. F F F F F 5. F F F F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 38
  • 39. 6 F (Six Basic Computer Operations) 1. F F F 2. F F F 3. F F 4. F F F 5. F F 6. F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 39
  • 40. F F F F F ( ) F F F F F F FF F F F F F F F F F F F F F F F F read get F F ◦ read F F F FF ◦ get F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 40
  • 41. F F F F read studentName get systemDate read number1, number2 get taxCode Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 41
  • 42. F F F F F print, write, put, output display ◦ print F F F F ◦ write F F F F ◦ put, output display F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 42
  • 43. F F F F print “Program Completed” write customer record to master file put name, address and postcode output totalTax display “End of data” Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 43
  • 44. F F F (Cont.) prompt F F F F get, F F F F F F promt for studentMark get studentMark Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 44
  • 45. F F F F ◦ F+ F (add) ◦ F– F (subtract) ◦ F* F (multiply) ◦ F/ F (divide) ◦ F() F / F F F compute calculate Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 45
  • 46. F F F divide totalMarks by studentCount salesTax costPrice * 0.10 compute C = (F – 32) * 5 / 9 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 46
  • 47. F F F F3 1. F initialize F set F F F 2. F F = F F 3. F store F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 47
  • 48. F F F F initialize totalPrice to zero set studentCount to 0 totalPrice = costPrice + salesTax totalPrice costPrice + salesTax store customerId in lastCustomerID Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 48
  • 49. F F F if…then…else F end if if employeeStatus is partTime then add 1 to partTimeCount else add 1 to fullTimeCount end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 49
  • 50. F F F dowhile…enddo repeat…until dowhile file_flag <> “eof” read student record print studentName, address to report add 1 to studentTotal enddo eof – End Of File Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 50
  • 51. F 3 (The Three Basic Control Structures) (Sequence) (Selection) (Repetition) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 51
  • 52. (Sequence Format) statement a statement b statement c : : Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 52
  • 53. F add 1 to pageCount print heading line1 print heading line2 set lineCount to zero read customer record Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 53
  • 54. (Selection Format) if condition p is true then statement(s) in true case else statement(s) in false case end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 54
  • 55. F (Simple IF Statement) if accountBalance < 300000 then serviceCharge = 5.00 else serviceCharge = 2.00 end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 55
  • 56. F (Null False Branch) if employeeStatus = partTime then add 1 to partTimeCount end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 56
  • 57. F (Combined IF Statement 1) if employeeStatus = partTime and employeeGender = female then add 1 to partTimeCount end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 57
  • 58. F (Combined IF Statement 2) if (recordCode = “23” or updateCode = delete) and accountBalance = zero then delete customer record end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 58
  • 59. F (Combined IF Statement 3) if not (recordCode = “23” and updateCode = delete) then update customer record end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 59
  • 60. F (Nested IF Statement 1) if recordCode = “A” then increment counter_A else if recordCode = “B” then increment counter_B else if recordCode = “C” then increment counter_C else increment errorCounter end if end if end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 60
  • 61. F (Nested IF Statement 2) if employeeStatus = partTime then if employeeGender = female then if employeeAge > 30 then add 1 to matureFemaleEmployee else add 1 to youngFemaleEmployee end if else add 1 to maleEmployee end if else add 1 to fullTimeEmployee end if Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 61
  • 62. (Repetition Format) dowhile dowhile condition p is true statement block enddo Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 62
  • 63. (Repetition Format) (Cont.) repeat…until repeat statement statement : : until condition is true Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 63
  • 64. F dowhile loop 1 set studentTotal to zero dowhile studentTatal < 50 read student record print studentName, address to report add 1 to studentTotal enddo Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 64
  • 65. F dowhile loop 2 Process Student_record set studentCount to zero read student record dowhile studentNumber not equal 999 write student record increment studentCount read student record enddo print studentCount end Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 65
  • 66. F repeat … until loop Process Student_record set studentCount to zero repeat read student record if studentNumber not equal 999 write student record increment studentCount end if until studentNumber = 99 print studentCount Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 66 end
  • 67. (Flowchart) F F F F F F F F F F F FF F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 67
  • 68. F 1. F F F F 2. F 3. F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 68
  • 69. F 2 F (System Flowchart) (Program Flowchart) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 69
  • 70. (System Flowchart) F F F F F F F F F F F F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 70
  • 71. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 71
  • 73. (Program Flowchart) F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 73
  • 75. F Terminal F START STOP F F F Manual Input F F F F F Monitor (Output) F F F F Input/Output Data F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 75
  • 76. F (Cont.) Process F - F F Decision F F F 2 (True) (False) (?) F F F Magnetic Disk F F F F Comment F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 76
  • 77. F (Cont.) Preparation ( ) F F F F F Sobroutine processing ( F F ) F F F F F F Document ( ) / F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 77
  • 78. F (Cont.) Connector F F F F F F F Off-Page Connector F F F F F Flow Direction Lines ( F ) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 78
  • 79. 1. F F F F 2. F F F F 3. Flowchart F F F 4. Flowchart F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 79
  • 80. (Cont.) 5. F F F F F F F F F 6. F Flowchart F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 80
  • 81. (Sequence) (Selection) (Repetition) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 81
  • 82. F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 82
  • 83. F Algorithm 1. F F F base height 2. (area) area = 0.5 * base * height 3. (area) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 83
  • 84. F Algorithm get base, height compute area = 0.5 * base * height display area Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 84
  • 85. F Start base, height area = 0.5 * base * height area Stop Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 85
  • 86. F F F F F (salary) F (tax) 10% F F F salary tax Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 86
  • 87. F Algorithm F F salary tax 1. F (Salary) 2. tax = salary * 0.1 3. --------------------------------- get salary compute tax = salary * 0.1 display salary, tax Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 87
  • 88. F Start salary tax = salary * 0.1 print salary, tax Stop Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 88
  • 89. Workshop: F Y = 2X * 2 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 89
  • 90. F F F F F F F F (True) (False) F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 90
  • 91. (Cont.) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 91
  • 92. Workshop: F F 100 F F F F 100 F F F F F 100 F F F F F 100 F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 92
  • 93. Workshop: F 2 F F F F F F F F F F F F F F F F F FF F F F F F F F F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 93
  • 94. (Cont.) F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 94
  • 95. (Cont.) Start 1 name, score Stop score > 0 Y N Y N score > 49 Display Error Display Pass Display Not Pass 1 1 1 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 95
  • 96. Workshop: F F 2 F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 96
  • 97. Workshop: F F 80 100 A 70 79 B 60 69 C 50 59 D 0 49 F F F F F F F F , F F F F F 0 100 F F F F Out of range 97
  • 98. F F F F (True) (False) F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 98
  • 99. ( F) Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 99
  • 100. (Cont.) Start N=? N = 55 I=? I = 11 N=0 I=1 N=? N = 15 I=5 I=5 N I <= 10 Y Display I N=N+I Stop I=I+1 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 100
  • 101. (Cont.) Start N=0 I=1 N=N+I I=I+1 Y N Display I Stop I <= 10 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 101
  • 102. F F F F F F F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 102
  • 103. F Algorithm F F 0 4 1. I F F 0 2. I 2.1 F I <= 4 F F F I I=I+1( F F I 1) 2 2.2 F I > 4 F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 103
  • 104. F Algorithm F F 0 4 set i to 0 dowhile i <= 4 then print i add 1 to i enddo Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 104
  • 105. Start I = 0 N I <= 4 Y Stop Print I I = I + 1 Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 105
  • 106. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 106
  • 107. F F F F 1 F F Do while F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 107
  • 108. Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 108
  • 109. Workshop: F 1-10 F F F F F 1- 10 F F F F F F F F F F F 2 – 12 F F F F Error” Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 109
  • 110. Homework: 1. F F F F F F F F 2. F F F F 1 – 50 3. F 2. F , F F F Chapter 1 Software Development and Mr.Warawut Khangkhan Analysis of the Problem 110