Common Computer Science References
At the end of this lesson, you will be able to:
create an application that uses functions
why do we have functions
code modularity and reusability
read "Functions", Chapter 3, Computer Based Problem Solving
read up to and including "By Value or By Reference"
read the following problem:
A board foot is defined as a piece of wood that is 12 inches wide by 12 inches long by 1 inch thick or 144 inches³.
Create a function called BoardFoot, that has 2 parameters, the width and the height.
It will then calculate the length, so that the result is exactly 1 board foot and return that value.
Your "main()" will from now do all the "input, error checking and output". The logic and process will ALWAYS be in functions from now on.
from now on ONLY do the flowchart for the functions, NOT main() any more
do the above in a second language