CPS 1 - Spring, 1999 - Ramm 2/22/99 #16
- Announce
- Exam ...
- Quiz on Wednesday
Chapt 4: Top-Down Programming, Subroutines, and Database Application
- Example of Parameter and Return Use
practice quiz:
Q06.txt
- Class Data; Known within class.
- Known within class.
- Instance Variable
- Problem Solving: Divide and Conquer
- Top-Down Implementation
- Dummy Routines: Stubs
- Within level: I/O First
- "Parallel" Arrays or "Corresponding" Arrays
- Model Phone Book Capability
- Array (of strings) for Names
- Array (of strings) for Phone Number
- Array (of strings) for Address
- Typical Access by Name
- For human use, ordered by name to speed access
- For computer use, may be fast enough for non ordered access
- Access by other Fields (other arrays)
- Can access by phone number and get name/address
- (like "phone -p 660-6532" on acpub system)
- 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