Jot:
I know this is the Processing forum, and that you're doing this for a Processing class but I'll say that I think Processing is really a poor choice for a text adventure. It matches the strengths of the genre with the weaknesses of the language, and vice-versa (using a programming language with rich possibilities for visualization in a medium which relies on ascii text and no visualization at all).
If you want to write a text adventure, there are some fantastic tools out there (
Inform 7 comes to mind). Of course that doesn't do much for you here.
For a class, I'd do a simplified variation on point-and-click adventures, no text parser at all; use a series of images for the backgrounds, small images for items the player can pick up or change, maybe (if you want to be really spiffy) a map pane which revealed rooms as you went, and then maybe, if you wanted to include inventory, an inventory pane showing what the player has picked up. You could write a really simple engine almost as a state machine; there's plenty of literature out there for that.
And for a class... well, keep it really simple. Game development is not nearly as easy as most people think it is, particularly if you want other people (the folks grading you) to play it. They will try the damnedest things you never imagined and then wonder why they don't work.