Lecture 12
11
Dictionary
•Model a real dictionary
•A collection of definitions of words
–A word is a String
–A definition will be an instance of class Definition
•Design: Dictionary object has a TreeMap field storing Definition objects keyed by String words
•API: create, add entry, look up entry, get size, arrange for printing the whole Dictionary