IN JAVA, Implement an AVL tree-based dictionary. with classes that runs on eclipse
methods and main program must all be in JAVA
#include #include "Dictionary.h" using namespace std; int main(){ Dictionary avl1; // isEmpty: cout Description: Your dictionary class must be called Dictionary. Your dictionary will use an AVL tree to store its contents (words). Each node in the tree will be an object of class WordNode that contains: a word, number of times the word is encountered in the dictionary (let's call it frequency), a boolean variable to support lazy deletion, its height in the tree and links to its left and right childrern The following public methods of Dictionary class must be implemented 1. bool isEmpty() const - returns true if empty, false otherwise 2. int getSize() - returns how many words are stored in the dictionary 3. void insert (String word) insert word into dictionary if it is not already present, otherwise increment the frequency variable for the corresponding word 4. int find(String word) - returns the frequency of the word in the dictionary if the word is present. If the word is not found in the dictionary find returns -1 5. void printSorted() const - prints the words in the tree in lexicographic order 6. void remove (String word) - implements the lazy deletion of a node Lazy deletion: In lazy deletion, instead of deleting the desired node and modifying the structure of the tree, we merely mark the node as deleted. During find operations, we return false if the desired node is found but marked as deleted. This way, the balance of a tree is never disturbed by deletion operations You do not have to implement recycling or garbage collection in this project. Note that once the node is deleted it should not be found via find method or printed by printSorted method