Saturday, December 13, 2014

Flowchart ( In English )

1. Sequence Diagram
Sequence diagram is an interaction diagram that shows how processes operate with one another and in what order. It is a construct of a Message Sequence Chart. A sequence diagram shows object interactions arranged in time sequence. It depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario. Sequence diagrams are typically associated with use case realizations in the Logical View of the system under development. Sequence diagrams are sometimes called event diagrams or event scenarios.
A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple run time scenarios in a graphical manner.
                            Sequence diagram of e-mail message sequence

2. Decision Diagram
Decision diagrams or decision tree is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility.
Decision Diagram

3. Loop or Iteration Diagram
Not indicated in this diagram for clarity is the fact that when a Stop Iteration is raised in the iteration method, the callback function and the state update are still performed before exiting the loop.
Loop or Iteration Diagram

รุปแบบการเขียงผังงาน ( ภาษาไทย )

 1. ผังงานแบบลำดับ                  
                  ผังงานแบบลำดับ (sequential flowchart) เป็นผังงานที่มีโครงสร้างการกระทำตามลำดับกิจกรรมก่อนหลังที่เรียงเป็นลำดับต่อเนื่องกันไปเรื่อย ๆ การเขียนผังงานแบบลำดับจะเป็นโครงสร้างที่ง่ายที่สุดเหมาะสำหรับงานที่ไม่มีความซับซ้อน ไม่มีการตรวจสอบเงื่อนไข และไม่ต้องการทำงานซ้ำ ๆ แต่ในบางครั้งผังงานแบบลำดับมักจะไปรวมอยู่ในผังงานแบบเลือก และแบบทำซ้ำในกรณีที่มีกิจกรรมทำงานต่อเนื่องกันไปเรื่อย ๆ โดยส่วนมากจะเป็นการจัดวาง กิจกรรมจากบนลงล่าง และจากซ้ายไปขวา
2
ตัวอย่างการเขียนผังงานแบบลำดับ


2. ผังงานโปรแกรมของการทํางานแบบทางเลือก
               ลักษณะของแบบสองทางเลือก (double selection) จะประกอบด้วย 1 เงื่อนไข และ 2 กิจกรรม หลักการตรวจสอบเงื่อนไข ถ้าเงื่อนไขเป็นจริง จะทำกิจกรรมที่ 1 แล้วออกจากโครงสร้าง แต่ถ้าเงื่อนไขเป็นเท็จ จะทำกิจกรรมที่ 2 แล้วออกจากโครงสร้าง และทำตามลำดับต่อไปเรื่อย ๆ จนถึงจุดสุดท้ายของผังงาน

      
ตัวอย่างการเขียนผังงานแบบทางเลือก



3. การเขียนผังงานแบบวนซ้ำ
                คือ โครงสร้างที่ขั้นตอนการทำงานบางขั้นตอนได้รับการประมวลผลมากกว่า 1 ครั้ง ทั้งนี้ขึ้นอยู่กับเงื่อนไขบางประการ โครงสร้างแบบทำซ้ำนี้ต้องมีการตัดสินใจในการทำงานซ้ำ และลักษณะการทำงานของโครงสร้างแบบนี้มี 2 แบบ ได้แก่ แบบที่มีการตรวจสอบเงื่อนไขในการทำซ้ำทุกครั้งก่อนดำเนินการกิจกรรมใดๆ ถ้าเงื่อนไขเป็นจริงจะทำงานซ้ำไปเรื่อยๆ และหยุดเมื่อเงื่อนไขเป็นเท็จ เรียกการทำงานลักษณะนี้ว่า การทำซ้ำแบบ do while และแบบที่ทำกิจกรรมซ้ำเรื่อยๆ จนกว่าเงื่อนไขที่กำหนดเป็นจริงแล้วจึงหยุดการทำงาน โดยแต่ละครั้งที่เสร็จสิ้นการดำเนินการแต่ละรอบจะต้องมีการตรวจอบเงื่อนไข เรียกการทำซ้ำลักษณะนี้ว่า การทำซ้ำแบบ do until ผังงานแสดงขั้นตอนการทำงานของโครงสร้างแบบทำซ้ำทั้งสองแบบแสดงดังรูปด้านซ้ายมือ


                                                                           
                                                 
                       

              ตัวอย่างการเขียนผังงานแบบวนซ้ำ