Saturday 28 May 2011

Explaination of If/Else Interactive Tree Poster

An if/else statement in code is a conditional statement. This means that if a specific condition is true, something will happen; else if that condition is false, something else or nothing will happen. My poster represents this concept through the metaphor of a fruit tree. In this case, if the fruit is ripe, the color of the fruit will change, else, if the fruit is not ripe, the color stays the same.

In this poster, the pull tag at the bottom represents the true or false condition of an if/else statement. In code, when an if/else statement is triggered, the action occurs simultaneously. This is represented through the action of the pull tag. The fruit in the tree (represented by the smaller bracket shapes) appear to ripen as the tag is pulled down. If the tag is not pulled, then the fruit is not ripe.

The pseudo code for this poster reads:

If (fruit == ripe) {
           color changes
    }
Else {
           color stays the same
    }

The tree itself is made out of brackets because they are so much a part of the coding language, and integral to the creation of any if/else statement. In addition, I made sure to keep the design of the tree simple, ordered, and patterned to represent the basic principles and functions of code.

No comments:

Post a Comment