Things we learned about parameters:
By having a method that uses more than one parameter we can make methods even more useful by controlling different ways in which method behavior can vary.
Parameters have a type. Previously we only had Object type parameters. Here we learned to use numerical type parameters.
Sample questions you should be able to answer after this module:
Look at the code for the Air Flips method to the right. This code makes a person jump into the air and do a flip like she is a gymnast, while thinking "I hope I don't mess up." Use this code to answer the following questions. There is also a video if you would like to see the code being executed. [Q5.6.1]: Currently this method takes no parameters -- it always makes a blueBallerina flip. If you wanted to be able to use this method in more situations you might want to be able to change the person doing the flipping. Suppose you decide to add a parameter to control that. What would be the type of that parameter (ex. Object, Boolean, Number, String)?
[Q5.6.2]: If you wanted to be able to change the number of spins the person does while in the air, what would you do?[Q5.6.3]: How many places in the code would you need to modify to be able to have a method that could vary in how many spins were performed? Describe.