Nov 25 2008
interactive fiction
My students, for their last laboratory, are currently working on a piece of interactive fiction. The class diagram for their code should be an extension of something that looks like this:

Their code makes use of HashMaps to handle relationships between objects of different classes, and they are encouraged to do something creative with their work of interactive fiction. On Friday, to reinforce their understanding of the use of associative data structures, we worked an example involving a Book class, a Bookshelf class, and a Librarian class that brought these pieces together. Today, they proposed a set of classes of their own design, and with a partner, implemented the code for those classes. All of my students were successful in this task in a 45 minute session.
While I don’t think my students have mastered modeling the world as an interrelated set of classes, I think they’re on their way to thinking like good object-oriented programmers. At least, we’ve made a good start.
Hopefully, the things I’ve introduced them to will serve them well in their next course. Sadly, their experience in my class is completely different from the other section of intro, where they are currently studying matrix multiplication in C (but using Java).
Either way, I hope to share some of their works of interactive fiction when they are done. It should be entertaining.
