CPS 1 - Spring, 1998 - Ramm 2/16 #14
- Announce
- Test Friday
- Review Sessions...
- Quiz Wednesday
- Begin Reading Chapter 4: Top-Down Programming...
Chapt 3. Numerical Computation and the Study of Functions
- Maximum Example (code fragment)
-
tallest = 0;
-
k = 0;
-
while (k < attending)
-
{
-
if (height[k] > tallest)
-
{
-
tallest = height[k];
-
}
-
k = k + 1;
-
}
- Applet Array Example
Hotel.java,
Hotel.html
- Improving the Hotel Example
- Writing Methods
- Informal synonyms
- Functions
- Procedures
- Subroutines
- Subprograms
- Have been invoking methods all along
- Also say call a method
- Arguments and Parameters
- Lots of Examples of Use