CSC151 2007S, Class 42: Association Lists and Searching * I feel like a broken record, but I consider it important enough that I will continue to reserve time at the start of class for any comments you have on campus climate. Admin: * We have another visitor today. * EC for ... * Gene Gaub's concert Thursday at 11 a.m. in Herrick. * Thursday afternoon's CS Thursday extra on TCDB. * Lunch on Saturday from Neuroscience SEPC on "Why and how to go to grad school in Neuroscience" * Symphonic Band on the 20th. 2pm See&Bring Louis * Discussion of Mental Health on Campus on the 22nd., 7-8:15 p.m. * Assigned: The Project (due Friday the 25th.) * Reading for Friday: Project Ideas. (Not ready until Friday.) Overview: * Storing information in tables. * Representing table entries as lists. * Representing tables as lists. * Association list: Scheme's standard table representation. * Implementing key association list procedures. * Lab! ==THe Project=== * More fun making imagess * YOu get nearly complete control * But we put "fun" restrictions on * Don't make one, make a series of *related* images (image-series n width height) * Use at least three different techniques == Where we Are == * Ways of representing groups of data in Scheme * List * Vector * String (group of characters) * Tree * Files * Today: Slight variant on list, along with some helpful procedures * A simplified form of database * Simple model: Table * A collection of keys with associated values * Given a key, find the corresopnding value * Group key and value together into a list ("Rebelsky" "4410") ("chartreus" 127 240 128) * Group lots of entries together into a list of entries (define silly-colors (list (list "charteus" 127 240 128) (list "read" 240 11 12) (list "chris" 120 120 6))) * Is this useful? * We can probably write aprocedure to search this list * The assoc procedure does just that