Write down the answers first. Click the to check your answer and to hide the answer.
1. What is the best way to break your code into small manageable pieces?
Use procedures and functions
2. If you have a movie and want both the camel and the elephant walk, what class would you write the walk procedure for?
3. What does this button do ?
It lets you add procedures, functions and properties to a class.
4. You have written some code for the bear to walk. When you copy the code to a procedure you will need to change bearCub to ___.
5. A procedure header is shown below. What are amount, speed and number Of Times called?
6. A procedure header is shown below.The calling statment is How many times does the bear cub shake his head?
7. The values that you see in the calling statement are called _____
8. What will the code below do?
The bear says “hello” at random intervals throughout the movie.
9. With the code shown below, when will the bear face the castleGate?
Never! This is an endless loop and the last line is never executed.
10. You have a movie with 5 different fish. You want all of them to swim. What is the best way to do this?
Create a swim procedure for the Swimmer class.
Please review the materials for any questions you miss.