Description
In this project you will implement a Binary Search Tree using bridges.base.BinTreeElement as the node and by implementing the provided BinTreeInterface.
1. Provide an implementation of the BinTreeInterfaceinterface as a class named BinSearchTree
2. In the BinSearchTree class, implement the following new methods: • /** Return the height of this binary tree */ public int height() • /** Returns true if the tree is a full binary tree */ public boolean isFullBST() • /** Return the number of leaf nodes */ public int getNumberOfLeaves() • /** Return the number of non-leaf nodes */ public int getNumberOfNonLeaves()
3. Include a main method that adds the following elements to the tree and visualize the tree in Bridges: BinSearchTree names = new BinSearchTree<>(); names.add(“Frodo”); names.add(“Dori”); names.add(“Bilbo”); names.add(“Kili”); names.add(“Gandalf”); names.add(“Fili”); names.add(“Thorin”); names.add(“Nori “);
Upload the URL for your visualization along with a screenshot that includes your webpage with a title and your name using the setTitle and/or setDescription mehods on your Bridges object.
Your file must be written in package – cmsc256. Upload only the BinSearchTree class to Gradescope for grading.
Follow the Coding Style Guideline in Blackboard and include a comment block that includes your name, the name of the project along with the file name and a brief description of the purpose of the class at the top of the source code file that you submit. Ask questions about any part of the programming project that is not clear.