Implement a Symbol table class such that each symbol is associated with a numeric value. The two main methods are set() and get() as follows: the set() method associates the int value with the symbol, sym; while the get() method performs the complement of retrieving the int value previously associated with sym. Define appropriate exceptions so that clients of the Symbol table may respond to conditions appropriately. For example, when clients retrieve the value of a nonexistent symbol, they can either stop execution and display an error message or use a default value of 0. (Hint: You can use HashMap and Vector to store symbol-value pairs.)
void set(String symbol, int value);
int get(String symbol);
Updated July 29 2020 by FST Course Production Staff