Quiz
Java uses two public fields in its FileSystem class to differentiate between a file and a directory:
public static final int BA_REGULAR = 0x02;
public static final int BA_DIRECTORY = 0x04;
Can you think of a better way to encapsulate this information using Design Patterns? What would you get in return?
When we want absolute coordinates we have to set the layout of a Container to null. Can you imagine what this implies for the implementation of Container? Is there a better way?