Next: Problem 1
Up: TwelfthWeek
Previous: Function Overloading
For each of the problems in this laboratory, perform the following
activities with your group.
- Read the program, but do not run it!
- Trace through it by hand and determine what the results of the program will be.
- Discuss your results with your group partner and come to a consensus on
the answer. When you have reached a consensus, then open your editor
and type in the program.
- If your answer disagrees with the results produced when you ran
the program, go back and see why your answer was incorrect. If you
cannot figure out a problem, ask your TA for help.
- After you get the desired output, submit the program to peach
Helpful Hint: When you try to trace parameters by hand, it
is useful to draw boxes for each object and then write the current
value in the box. This method enables you to see what is going on with
each parameter. It also enables you to cross out an old value and
replace it with a new one every time an object is updated.
Next: Problem 1
Up: TwelfthWeek
Previous: Function Overloading
cs101 senior TA
2005-10-24