7.1 User-defined Method basics

1234567891011121314151617181920
Across
  1. 4. (code) Write a statement that calls a method named calcCalories, passing the value 3 as an argument.
  2. 5. After executing in a method like calcPizzaArea(), it goes to the original location indicated as this method:
  3. 6. This class indicates that the method only uses values passed to the method.
  4. 9. A method input specified in a method definition; like declaring a variable where it is assigned with an argument's value
  5. 10. A return type of this indicates that the method does not bring any a value in return.
  6. 13. Method statements may also call _____ methods. (ex: pizzaCals() calls calcCircleArea())
  7. 16. This class indicates that a method is called from any class in the program.
  8. 18. (hyp as space) Complete the method beginning to have a parameter named numServings of type int: int calcCalories(__?__) {
  9. 19. Redundancy is reduced by creating a grouping of predefined statements for repeatedly used operations to ease confusion
  10. 20. A program may perform the same operation repeatedly, causing a large and confusing program due to what?
Down
  1. 1. (code) Write a statement that calls getSum() to return the sum of x and 400 (providing the arguments in that order). End with ;
  2. 2. (2 words) Calling the method's name to execute the statements; any valid identifier
  3. 3. A return statement returns only ____ value(s).
  4. 5. A method definition may have ______ parameters, separated by commas.
  5. 7. Methods MUST be defined within a _____? (ex: public class PizzaArea {)
  6. 8. (2 words) Consists of the new method's name & block of statements (ex: public static double calcPizzaArea() {} )
  7. 11. List of statements surrounded by { }
  8. 12. Value given to a method's parameter during a method call (ex: calcPizzaArea(12.0))
  9. 14. This statement is used by a method where it "brings back" a value.
  10. 15. These: public & static are used by methods (like main() and calcPizzaArea() )
  11. 16. Multiple parameters are assigned with argument values by ________.
  12. 17. A method is a named list of _______.