Informatics 42 • Winter 2008 • David G. Kay
• UC Irvine
Ninth Homework
Get your work checked and signed off by a classmate, then show it to your TA in lab by Friday, March 14. This
assignment is short; use the remaining time to complete the lab assignment.
(a) Be able to give answers to questions
like these. Feel free to talk with your classmates about them, but realize
that the point isn't to have the answer but to know how to
get the answer, especially if similar questions should show up on exams.
-
What data structure does the simulator use
to store the rides? Is there a more efficient alternative? If so, describe
that alternative and the circumstances in which it's more efficient.
-
What data structure(s) does the simulator use
to store the customers? Are all the customers stored in the same data structure?
Can you describe, from a customer's point of view, the data structures
the customer is part of during a day in the park?
-
What data structure(s) does the simulator use
to store the rides a customer has visited? Can you describe them in prose
or with diagrams? Why did the authors make that choice—what are the advantages
and disadvantages, can you describe another choice might they have made,
and how would that choice have been better?
Written by David G. Kay, Winter 2005; modified
Winter 2006.