Symbol table class
JAVA Programmers
Java includes a Hashtable class which makes setting up the symbol table class trivial. You will need to implement a dump table method (see below).
C++ programmers
This is what you need to implement for the symbol table calss:Class data member
Class behavior
-
Constructor
-
Insert in symbol table
-
Look up in symbol table
- Dump table contents
- Destructor
Class relationships
-
Uses classes derived from Symbol_table_entry class
Constructor
-
Allocates a hash table of size table_size
-
Initializes all entries in the hash table to null
Destructor
-
Deletes entire table and contents
Dump table contents
Hash functions
You are free to use these, but if you do you must explain how they
work in a comment at the head of the function definition.