@@ -0,0 +1,1437 @@
+/* Class: AdvMotionTableEntry */%0A/**%0A * This class is used to store a single entry in the motion table.%0A */%0A%0Apublic class AdvMotionTableEntry %7B%0A%0A/* Constructor: AdvMotionTableEntry(dir, room, key) */%0A/**%0A * Creates a new motion table entry.%0A *%0A * @param dir The string specifying the direction of motion%0A * @param room The number of the destination room%0A * @param key The name of the object used as a key, or null if none%0A */%0A%09public AdvMotionTableEntry(String dir, int room, String key) %7B%0A%09%09direction = dir.toUpperCase();%0A%09%09destinationRoom = room;%0A%09%09keyName = (key == null) ? null : key.toUpperCase();%0A%09%7D%0A%0A/* Method: getDirection() */%0A/**%0A * Returns the direction name from a motion table entry.%0A *%0A * @return The string specifying the direction of motion%0A */%0A%09public String getDirection() %7B%0A%09%09return direction;%0A%09%7D%0A%0A/* Method: getDestinationRoom() */%0A/**%0A * Returns the room number to which a particular direction leads.%0A *%0A * @return The number of the destination room%0A */%0A%09public int getDestinationRoom() %7B%0A%09%09return destinationRoom;%0A%09%7D%0A%0A/* Method: getKeyName() */%0A/**%0A * Returns the name of the object required for travel along a locked%0A * passage, or null if the passage is always available.%0A *%0A * @return The name of the object used as a key, or null if none%0A */%0A%09public String getKeyName() %7B%0A%09%09return keyName;%0A%09%7D%0A%0A/* Private instance variables */%0A%09private String direction;%0A%09private int destinationRoom;%0A%09private String keyName;%0A%7D%0A

Create AdvMotionTableEntry.java