Question
C sharp please Create a HashTable class that stores two-letter state abbreviations as keys and the spelled-out state names as values. Your class should have
C sharp please
Create a HashTable class that stores two-letter state abbreviations as keys and the spelled-out state names as values. Your class should have an add(key, value) method, a find(key) method, and a private hashf method that contains the simple hash function of adding the key's character ASCII values. The hash table itself should be an array of arraylists.
To find the ASCII value of a string, take a single character from the string and convert it to int. Here is a loop that displays all the ASCII values of a string:
string s = "abc";
foreach (char c in s) {
Console.Write((int)s);
}
C sharp please
Create a HashTable class that stores two-letter state abbreviations as keys and the spelled-out state names as values. Your class should have an add(key, value) method, a find(key) method, and a private hashf method that contains the simple hash function of adding the key's character ASCII values. The hash table itself should be an array of arraylists.
To find the ASCII value of a string, take a single character from the string and convert it to int. Here is a loop that displays all the ASCII values of a string:
string s = "abc";
foreach (char c in s) {
Console.Write((int)s);
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started