Tuesday, November 25, 2008

Parameters - Communication with Methods

Parameters are a way of communication with methods. They allow to pass on pieces of information to a method. Using this information a method then carries out it's action.
We have used some primitive methods with parameters: For example: the "turn" method can cause an object to turn in a certain direction depending on the value of the parameter.

Today we are learning how to create and use our own methods with parameters.

Homework
  • Read Section 4.3 on Class-level Methods and Inheritance, pages 110-121, and
  • answer the review questions 4.3.

No comments: