Showing posts with label branch functions. Show all posts
Showing posts with label branch functions. Show all posts

Monday, February 6, 2012

Branch Functions

Our journey into functions has gotten more complex. We have moved on to branch functions. Here is a picture of what we have accomplished.


Conclusion

1. Describe why it is important to include branches in programs.

It's important to have branches in a program because they allow for the function to become more complex. It can allowed for loops to occur as well as allow a switch to be added to the function.

2. Describe an everyday application of a normally open switch that has not been given as an example.

An example of an everyday application of a normally open switch is a doorbell. When someone presses the button for the doorbell, it closes the system setting the bell off.

3. Describe an everyday application of a normally closed switch that has not been given as an example.

An example of an everydayapplication of a normally closed switch is a house alarm system. When wiring a house for the alarm system, one would put the wire normally closed. One on the door and one on the door-frame. When the door was opened, the current would be broken, setting the alarm off.