CPS 1 - Spring, 2000 - Ramm 2/25/00 #17
- Announce
- Finish Reading Course Pack Chapter 4
- Read Chapter 4 supplement on Web
Section 4.5,
Chapt 4: Top-Down Programming, Subroutines, and a Database Application
- Information Retrieval
- "Phone List" Using Two Arrays
- "Phone List" in a Single Array
- Extend Idea to Database
- Generalization of phone book problem
- Can have many "parallel" arrays
- Basic Data Base Functions
- Load Data (File I/O would be nice)
- Display Data (Complete Dump)
- Query/Search (Selective Info Retrieval)
- Edit/Update (Update or Correct: Edit Database)
- Wild Card Retrieval
- Allows query to say "I don't care" for certain fields
- Used Car Database
UsedCars.java,
UsedCars.html
- Other Possible Commands
- output counts rather than displaying data
- logical expressions
- for numeric data give ranges
- Relational Data Bases
- Example: Personnel Database
- Employees
- Departments
- Job Descriptions
- Recursion
- Factorial (N!)
- decomposing problem
- base case
- recursive case which gets closer to solution
- Factorial
RecFact.java,
RecFact.html
- Iterative Approach for Factorial