CSC153 2004S, Class 43: Implementing Lists with Arrays Admin: * Visitors * Freda Rebelsky, Professor Emerita of Psychology, Boston University (Sam's mom) * Richard Furuta, Professor of Computer Science, Director lots of institutes, Texas A&M * Prospective Grinnellians? * Steven, California, Comparing to Pomona, Recursive goodness definition * Keith, Chicago, Shampoo-Banana, Undefinable * Todd, Kansas City/Kansas, UK, NFL * Carl, Walla Walla Washington, Already a Grinnellian, A warm fuzzy feeling * Lauro, LA, Grinnellian, Chemical and Electrical signals * Prospective parents of Grinnellians? * Why come to Grinnell rather than huge state school * Abuse prospectives * Know your faculty * Why go to huge state school * Your faculty won't know who you are so they won't pick on you when you shouw up late to class ANDY * Humanities Informatics talk at noon today in 2424. Free Pizza and Soda/Pop/Coke/Carbonated Bev/ * Read "Lists with Current Considered Harmful" * Questions on the exam? Q: What's the difference between an Order (probl 3) and Sorting (probl 4)? A: Order compares two values and reports which comes first: Returns boolean Sorting: Takes an array and puts the values in sorted order Q: What's the difference between an Orderable and an Order A: Orderable objects have a "natural" order, and can directly compare themselves to each other Orders provide orderings for objects with no natural order Orders provide alternative orderings for objects with a natural order Overview: * Strategy: Use an array * Testing: See TestGL.java and TestABGL.java * Implementations of key operations: add, replace, remove, clear * Running times of those implementations * Improving inefficient implementations See GeneralList.java for the list of operations we want to implement Our challenge: Implement all those operations Sam's suggested general strategy: * Shove the elements into an array What if you have to make it larger? * Allocate a bigger array and copy the elements over