important note: this is cpp project and convert to java projectand i dont see papercode. please write complier. and true java codecopy paste.
the cpp code should be translated into java.
i need to java code.
BinarySearchTreeIndex.h:
#include
#include
#include”BTreeNode.h”
#pragma once
template
class BinarySearchTreeIndex {
private:
BTreeNode *root;
string stopwords[173] = {“a”,”about”,”above”,”after”,”again”,”against”,”all”,”am”,”an”,”and”,”any”,”are”,”aren’t”,”as”,”at”,”be”,”because”,”been”,”before”,”being”,”below”,”between”,”both”,”but”,”by”,”can’t”,”cannot”,”could”,”couldn’t”,”did”,”didn’t”,”do”,”does”,”doesn’t”,”doing”};
bool isMember(BTreeNode *r, const string &w,int FN)
{
if (r == NULL)
returnfalse;
else if (w.compare(r->word) ==0)
{
r->listOfFiles.insertEnd(FN);
r->frequency++;
returntrue;
}
return isMember(r->lchild, w,FN) || isMember(r->rchild, w, FN);
}
void ins(BTreeNode *r, const string &w, int FN,int &flag)
{
if (r == NULL)