Lecture #12
- Announce
- Continue to Read Chapter 3
- Quiz Today
Numerical Computation and the Study of Functions
- Simple Statistics Program Design
- Get Data Into Array
- Display Data
- Display one at a time
- Could use TextArea
- Compute
- Control
- Display
- Algorithms for Extrema
- Algorithm for Mean
- Stats Example
ArrayStats.java, ArrayStats.html
- Writing Methods
- Informal synonyms
- Functions
- Procedures
- Subroutines
- Subprograms
- Have been invoking methods all along
- Also say call a method
- Arguments and Parameters
- Revisit Diamond Program
- Use Functions
- Dia(), and Mond()
- Still Fixed
DiaFuncts.java, DiaFuncts.html
- Slipped Parameters into ArrayStats Example.
(got one question after class)
- Use Parameters to Increase Flexibility
- Use IntField to read in size
- Parameters change looping
DiaParms.java, DiaParms.html