Write a java binary search tree program

Assignment Help JAVA Programming
Reference no: EM13163633

 write a JAVA binary search tree program with the following criteria: _________________________________________________________________ Description: Create a class called BinSearchTree. BinSearchTree will implement a binary search tree. BinSearchTree will be a GENERIC class storing a value of the generic type. It should have the following methods. The methods should all operate on the object making the call (none are static). 10 points a) add Adds a node to the tree containing the passed value. 10 points b) find Returns true if the value passed is in the tree. 10 points c) leafCount Returns the count of all of the leaves in the tree. 10 points d) height Returns the height of the tree. 10 points e) balance Rebuilds the tree to minimum height. 10 points f) isPerfect Returns true if the tree is a perfect tree. (A perfect tree is filled at every level). 10 points g) numLevels Returns the number of levels in the tree. 10 points h) isMirror Returns true if the left subtree structure is a mirror of the right subtree 10 points i) PreorderPrint Prints node values using a preorder traversal. 10 points j) Main Demonstrates all of the above methods. 

Reference no: EM13163633

Questions Cloud

Two cyborgs walk into your home : Two cyborgs walk into your home, both claiming to be oracles for the graph 3-colorability decision problem. They both always give a yes/no answer in constant time for any instance, and are each self-consistent
Design a wireless network : (15%) Allen FINALLY has been able to secure broadband service to his home in a remote area of the country via newly installed telephone lines. He had a powerful desktop. But he wants to be able to sit on his deck when using his new laptop to do his o..
Users to input two forces by their components : write a programm to ask users to input two forces by their components of (Fx1,Fy1) and (Fx2,Fy2) from the keyboard.call twice the function to display both magnitude and direction angle of two forces on the screen.add two forces and display both magni..
Trigger named products_insert : Create a trigger named Products_INSERT that inserts the current date for the DateAdded column of the Products table if the value for that column is null. Test this trigger with an appropriate INSERT statement.
Write a java binary search tree program : write a JAVA binary search tree program
Create an array of integers at random : create an array of integers at random with a range of 0 through 1000 in Java... any hints?
Trigger named products_update : Create a trigger named Products_UPDATE. This trigger should insert the old data about the product into the ProductsAudit table after the row is updated. Then, test this trigger with an appropriate UPDATE statement.
This code uses separate chaining : This code uses separate chaining ...implement it using double hashing. Implement a separate-chaining table in which each integer x is hashed twice using two different hash functions h1(x) and h2(x). This will perhaps produce two different location..
Recall that a computer virus is malware : Recall that a computer virus is malware that relies on someone or something (other than itself) to propagate from one system to another. Write a computer virus that can be written to other empty text documents by running the batch program.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java application to input three integers from user

Write Java application that inputs three integers from user and displays sum, average, product, smallest, and largest of the numbers.

  Develop java code to compute monthly rent for housing units

Develop a java code that computes monthly rent for 3 housing units namely Bungalows,Apartments and hostels. All housing units have got size,color and monthly rental rate.

  Write an application that extends jframe

Write an application that extends JFrame and that displays a phrase in every font size from 6 through 20.

  Write a method in java that uses a switch statement

Write a method in JAVA that uses a switch statement and takes a person's age using an integer parameter , then checks if the age is valid (0-110), and then RETURNS a string based on the age

  Write program in java for total amount of customer-s order

Write down program in Java which would ask for clerk to enter total amount of customer's order. Program will then compute seven percent (7%) sales tax.

  When the user presses a button

When the user presses a button, get the text from text field. Now extract the words from the text one at a time and find the largest word of length 4 or more. Let's call this largest word X for now. In response, create a question based on the length ..

  Create a calculator function

This is the code for my trip planner,you need to figure out how to create a calculator function to enable users to calculate their own costs if they choose

  Executing stringed musical instrument class

Create and execute a stringed musical instrument class.

  Reads in up to 1000 non-negative integers

Write a program that reads in up to 1000 non-negative integers and displays distinct numbers (i.e., if a number appears multiple times, it is displayed only once). (Hint: Read each number and store it in an array if it is new. If the number is alread..

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

  Productexception class whose constructor

Create a ProductException class whose constructor receives a String that consists of a product number and price. Save the file as ProductException.java. Create a Product class with two fields, productNum and price. The Product constructor requires va..

  Design and implement a sorting algorithm

Your task is to design and implement a sorting algorithm and running time grows as a linear function of the array

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd