Summary
In this chapter the authors introduce methods that do not return values. The authors present creating methods, method composition, and method parameters. You also learn the difference between the term argument and parameter. By the chapter’s end you should be comfortable writing methods that take no parameters or methods taking one or more parameters.
Chapter Slides
Try It – Step by Step
- Math Methods
- Composition Revisited
- Adding New Methods
- Flow of Execution
- Parameters and Arguments
- Multiple Parameters
- Stack Diagrams
Supplementary Videos
In the Adding New Methods Step by Step I introduce using Eclipse. Although using Eclipse is not mandatory for completing the tutorials, it is presented here due to Eclipse’s popularity. The following video by LearningLad illustrates installing and using Eclipse.