Friday, December 12, 2014

Flowchart(รูปแบบการเขียนผังงาน)


1. ผังงานแบบลำดับ

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


2.ผังงานแบบทางเลือก

การทำงานแบบทางเลือก (Selection) หรือเรียกอีกอย่างหนึ่งว่า การทำงานแบบตัดสินใจ (Decision) นั่นคือเราสามารถให้โปรแกรมเลือกทำงานอย่างใดอย่างหนึ่งได้ โดยใช้เงื่อนไขเป็นตัวกำหนดการทำงานตามคำสั่ง โดยทั่วไปโปรแกรมจะกำหนดเอาไว้ว่าถ้าเงื่อนไขเป็นจริงโปรแกรมจะไปทำงานอย่างหนึ่ง แต่ถ้าเงื่อนไขเป็นเท็จโปรแกรมก็จะไปทำงานอีกอย่างหนึ่ง นั่นก็หมายความว่า โปรแกรมจะเลือกทำงานทิศทางใดทิศทางหนึ่งเท่านั้น เช่น เมื่อเราขับขี่รถไปถึงทางสามแยก เราจะต้องตัดสินใจไปทางใดทางหนึ่ง ไม่สามารถวิ่งไปทั้งสองทางได้ในเวลาเดียวกัน





3.ผังงานแบบวนซ้ำ


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






1.Sequence

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


2.Decision


A Decision Diagram 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.







3.Loop or Interaction

 loop diagram (CLD) is a causal diagram that aids in visualizing how different variables in a system are interrelated. The diagram consists of a set of nodes and edges. Nodes represent the variables and edges are the links that represent a connection or a relation between the two variables. A link marked positive indicates a positive relation and a link marked negative indicates a negative relation. A positive causal link means the two nodes change in the same direction, i.e. if the node in which the link starts decreases, the other node also decreases. Similarly, if the node in which the link starts increases, the other node increases as well. A negative causal link means the two nodes change in opposite directions, i.e. if the node in which the link starts increases, the other node decreases and vice versa.










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































No comments:

Post a Comment