Fix the main file errors
Extracted text: BinarySearchTree1.java x 1 import java.util.*; 2 public class BinarySearchTreel 3 , { public Node root; private int max; private int count=0; private int sum=0; public BinarysearchTree1 () { 4 7 9 root = null; 10 11 v public Node getroot () { 12 return root; 13 14 v public Node Search(int KEY) { 15 Node x = root; while (x != null && x.item != KEY) { if (KEY < x.item)="" {="" x="x.Left;" }="" else="" {="" x="x.Right;" 16="" v="" 17="" v="" 18="" 19="" y="" 20="" 21="" 22="" return="" x;="" x.item="" key="" or="" x="=" null="" 23="=" 24="" 25="" public="" node="" searchrec="" (node="" root,="" int="" key)="" 26="" v="" if="" (root="=" nul1)="" return="" null;="" 27="" 28="" 29="" if="" (="" root.item="=" key="" )="" *="">Extracted text: Main.java x Console Shell import java.util.*; 2 v public class Main{ > javac -classpath .:/run_dir/junit-4.12.jar:target/dependency/* -d . Bin arySearchTree1.java Main.java Main.java:8: error: getHeight() has private access in BinarySearchTree1 int height=myTree.getHeight(); 4 public static void main(String [] args){ BinarySearchTreel myTree = new BinarySearchTree1(); Main.java:10: error: getlargestKey () has private access in BinarySearchTI ee1 myTree.Insert (1); int height=myTree.getHeight (); int largestkey=myTree.getLargestKey (); 8. int largestkey=myTree.getLargestkey (); Main.java:12: error: cannot find symbol float avg=getAverage(); 10 11 float avg=getAverage (); symbol: method getAverage () location: class Main 12 13 14 3 errors 15 exit status 1
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here