Homework 8: Due November 16th
Note:
An actual parameter (called argument in the book) is in the calling statement.
A formal parameter (called parameter in the book) is in the method header.
The values returned from a value-returning method are used in one of three ways:
- save the value for further calculation
- use the value in some calculation (or in a boolean expression if it is boolean)
- print the value
- Read Chapter 5, sections 5.1 - 5.6
- Answer the study questions.
Study Questions
- Complete checkpoints 5.1 - 5.5.
- What are arguments?
- Write the method header for a method named study1 that is passed two integers and returns no values.
- Write a calling statement to method study1.
- What does it mean to pass by value?
- When you pass a String object describe what happens when you change its value.
- String objects in Java are immutable. What does that mean?
- Complete checkpoints 5.7 - 5.10.
- What is a local variable?
- Are local variables initialized with a default value?
- How many values can a value-returning method return?
- How do you indicate that a method is returning a value?
- Can a value-returning method return a boolean value?
- Complete checkpoints 5.11 - 5.14.
- Complete Multiple Choice and True/False questions 1-4, 8, 10-20.
- Complete Find the Error questions 1-4.
- Complete Algorithm Workbench questions 1-9.
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2013