Another class hierarchy
Problem context: data storage facilities in a computer system
Suppose there are three:
- cache (very fast, very small)
- main memory (RAM), pretty fast, moderately sized
- disk (hard drive), slow, very big
Methods we’d like:
- getSpeed, getSize, getCost
- for hd: how much is swap space? for RAM: what is the page size? For cache: What’s the replacement policy?