Ch7Classwork021109 - operate on different types or numbers or arguments This feature is called method overloading(2 Give the method header for each

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 106:  Ch 7(User-Defined Methods) Classwork (02/11/09) NAME: Jamel Jenkins DATE: 02/11/2009 (1)  Fill in the blanks in each of the following statements: a. A method is invoked with a(n) method call . b. A variable known only within the method which it is declared is called a(n)  actual  parameter . c. The  return   statement in a called method can be used to pass the value of an  expression back to the calling method. d. The keyword   void    indicates that a method does not return a value. e. The  scope  of a declaration is the portion of the program that can refer to the  entity in the declaration by name. f. In Java, it is possible to have several methods with the same name that each 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: operate on different types or numbers or arguments. This feature is called method overloading . (2) Give the method header for each of the following methods: a. Method hypotenuse, which takes two double arguments and returns a double result. i. public static double hypotenuse(double j, double k) ii. { iii. double a = j + k; iv. return a; b. Method smallest, which takes three integers x, y, and z and returns an integer. i. public static int smallest(int x,int y, int z) ii. { iii. return x + y + z; c. Method instructions, which does not take any arguments and does not return a value. i. public static void instructions() ii. { }...
View Full Document

This note was uploaded on 10/04/2010 for the course COMPUTER S 106 taught by Professor Moore during the Spring '08 term at Clark Atlanta.

Page1 / 2

Ch7Classwork021109 - operate on different types or numbers or arguments This feature is called method overloading(2 Give the method header for each

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online