import java.awt.*; import java.beans.*; import java.util.*; /** * This is an abstract class, which means you cannot instantiate it. * But it has two usful subclasses. Even though this class cannot be * instantiated, you can still call methods on any Hall, as detailed below. **/ abstract public class Hall { private PropertyChangeSupport pcs; public Hall(Room r1, Room r2) { pcs = new PropertyChangeSupport(this); // add necessary code here to capture instance vars } abstract public void openDoors(); public PropertyChangeSupport getPCS() { return pcs; } /** Depends on whether we are horiz or vertical hall */ abstract public LockInvokable getLock1(); /** Depends on whether we are horiz or vertical hall */ abstract public LockInvokable getLock2(); /** Using an anonymous, inner class, spawn a new Thread that * gets a {@link DoubleLock} on this hall's two rooms, and then * calls openDoors (overridden in subclasses */ */ public void doit() { } public Thread getThread() { return null; } // FIX public String toString() { return("Hall between " + getRoom1() + " and " + getRoom2()); } /** Returns the first room specified in the constructor call. **/ public Room getRoom1() { return null; // FIX } /** Returns the second room specified in the constructor call. **/ public Room getRoom2() { return null; // FIX } }