Unformatted text preview: 3. For each of the three variables in main , tell what effect foo had on it. Why do some of these variables change and some do not? 4. Change the program so that foo can change the parameter c too (but not a ). Copy the revised program to your report, putting any changed lines of code in bold. (Don't worry about adding comments for this part only.) 5. Give a sample run of your changed program. Part B: Swap Function Write a void method called SwapIntegers that takes in two inputs and switches their values. Test your function with a short test driver that calls the function at least twice. Here's an idea of what the running program should look like: Before SwapIntegers call: x = 5 y = 7 After SwapIntegers call: x = 7 y = 5 For this part of the report, give the code and the sample run....
View Full Document
This document was uploaded on 02/10/2011.
- Fall '10