Mga Kaugnay Na Pag Aaral at Literatura

1918 WordsFeb 15, 20138 Pages
Copyright © 2009 All rights reserved JERRY ESPERANZA Objective The module was designed to achieve the following; 1. Identify flowcharting symbols. 2. Use flowchart symbols in identifying steps/pseudocode in logic formulation. 3. Formulate flowchart solutions. The material used a problem-direct solution approach. Instead of defining each flowchart symbol first, we applied it on situation when we need it and define it on the sidelines. What covered on this material are program flowcharts. System flowcharts are designed to show interface between input/output devices, to other systems, and the program itself. It uses other specialized symbols which are beyond the coverage of this courseware. Though new tools are being introduced in software…show more content…
2. Check traffic light signal. 3. If signal = green 3.1 Continue driving. Solution 1 Start 4. If signal = red 4.1 Press brake. 5. If signal = yellow 5.1 Prepare to stop. Slow down at intersection. * Decision box branches to the next instruction depending on the result of condition. ** On-page connector used to direct at the next instruction WITHIN the page. Label it either by letter or number or combination of both. Check traffic light signal. * Signal = green? ** Y Continue driving. C N Signal = red? Y Press brake. C N Signal = yellow? Y Prepare to stop. N C End http://ThrivingAndLiving.blogspot.com 4 Solution 2 We can solve the same problem using a different approach. No need to test if the signal is yellow. We can logically assume that if it is not green, two conditions would remain: either red or yellow. Green is tested first; red next. Therefore, neither green nor red, we proceed immediately to step when the color is yellow. Thus, we eliminate the condition of testing yellow. Start Slow down at intersection. Check traffic light signal. Signal = green? Y Continue driving. C N Signal = red? Y Press brake. C N Prepare to stop. C End http://ThrivingAndLiving.blogspot.com 5 Initialize your Storage Algebra uses literals (x and y variables) in solving an equation. In programming, variables or identifiers are treated as memory storage. We need to name (and initialize) it at the start of every program. Just like in an
Open Document