1. Open the original project zuul-better that you first encounter in this unit%u2019s required reading. Save it using a different name, in this format: zuul-last_name_first-initial. For example, John Smith titles his project zuul-smith-j. Use this project as the starting point for this Application and add all of your elements to it.
  2. Draw a UML diagram for an Item. An Item has a name, a description, and a weight. Note that a room can contain many Items. Now implement the Item class.
  3. Update the Game class so that it creates one or more Items in some of the rooms.
  4. Implement a back command as a single word. The command returns the player to the previous room he/she was in.
  5. Refactor the program to introduce a separate Player class. A Player object stores at least the current room of the player, but might store additional player info like player%u2019s name (Exercise 6.28 in the textbook). Make sure that the back command still works once you introduce the Player class.
  6. Implement an extension that allows the player to pick up a single item. This includes implementing two new commands: take and drop (Exercise 6.30).
  7. Limit the number of things a Player can carry based on the total combined weight of the items. Construct a UML diagram that illustrates the relationship between Player, Room, and Item (Exercise 6.30-6.31).
  8. Implement an Items command that lists the Items the Player currently holds (Exercise 6.32).
  9. Implement a Wizard. A Wizard acts like a vending machine for information, providing the Player specific feedback if given the correct gift (a specific Item). Design the Wizard using the following UML class diagram.


    <necessary fields>

    + offer(Item gift) : String

  10. Implement a talk command for the Wizard; it has a second word, the item the Player wants to give to the Wizard. If the Wizard wants the item, the appropriate information is passed on and the item is removed from the Player%u2019s inventory. Otherwise, the Wizard simply, cryptically, and very politely replies, %u201CThank you,%u201D but still takes the item. It was a gift, after all.
  11. Ensure that the elements you add to the program are highly cohesive and loosely coupled.


Detailed answers to tough
homework problems