Date of submission: 04.01.2011
Mrs. Hema C.N., PGT, Comp. Sc.
- Why do we need methods/ functions?
- What are comments? In java which symbol is used for commenting?
- What do you mean by method prototype?
4. Write the prototype for defining the following method.
“ The method FindInterest ( ) takes 3 float type variables p, r and t as
arguments and returns a double type variable.”
5. Difference between passing by value and passing by reference?
6. Define a method validate( ) that will accept age of a person as argument and
returns true if the age is in between 18 and 40 otherwise it returns false.