0.Design Pointsยง
- Normally for container classes we would want to detach the implementation from the data type. But since the hash function is tied to the key, we will just hard code them to store strings in P1.
- A bad design: Main file (Memman.java) initializes program and implements the command processor. Calls hash tables to do main operations.
- A better design:
- Separate logical activities into separate classes (even if a couple of them end up small this time).
- Main class only initializes the program
- Syntax is done in separate command processor class
- Semantics are handled in a separate "world" or "database" class. For P1, this has hash tables and memory manager.