write code for c++
cs202-computer scienceII programming Assignment Implement a new table class that uses chained hashing. Use an STL list container (http://www.cplusplus.com/reference/list/list/) for each chain. Set your table’s size such that an average search examines approximately 8 table elements. For your hashing function, you may use this simple algorithm: long hashval = 0 for each character in the string: hashval = character + 31 * hashval return hashval % TABLE_SIZE Next, you will write a program to “exercise” your new table class. The name of this program should be pa10.cpp. Consider the following scenario: You have just moved from Las Vegas to a small city in Guilder. The people there speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them. Input consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words. Each dictionary entry is a line containing an English word, followed by a space and a foreign language word. No foreign word appears more than once in the dictionary. The message is a sequence of words in the foreign language, one word on each line. Each word in the input is a sequence of at most 30 lowercase letters. Output is the message translated to English, one word per line. Foreign words not in the dictionary should be translated as “meh”. I will publish the final test input file to the /home/shared directory over the weekend. Your solution should process this file in less than 3 seconds. Sample input dog ogday cat atcay pig igpay froot ootfray loops oopslay atcay ittenkay oopslay Output for sample input cat meh loops Use the turnin command to submit your table.h, table.template, and pa10.cpp