Implement the class BestAnagramFinder, which takes a list of words named as 'dictionary' as a parameter while initialization. The class has the below methods:
- hashAnagram: an abstract method which takes a 'word' as a parameter and returns the hash value of the word.
- calculateScore: a method which takes a 'word' as input and calculates the score of it. The score is calculated by adding up all the absolute distance of the adjacent characters in the word.
- findBestAnagram: a method that takes a 'word' as input and returns the best anagram for the 'word' (best anagram is the word which has the maximum score).