Friday
May 29, 2015

Homework Help: shabou

Posted by Nadja on Wednesday, January 25, 2012 at 11:25am.

Can someone please make a Binarytree of these methodes in Java?:
public void add(int element)
//Adds the specified element into this datastructure.

public void clear()
//Removes all of the elements from this datastructure.

public boolean contains(int element)
//Tests if the specified element is a component in this datastructure.

public int[] inOrder()
//Returns an array containing all of the elements in this datastructure inorder.

public int[] postOrder()
Returns an array containing all of the elements in this datastructure postorder.

public int[] preOrder()
Returns an array containing all of the elements in this datastructure preorder.

public void remove(int element)
Removes the specified element from this datastructure.

public int size()
Returns the number of components in this datastructure.

public int[] toArray()
Returns an array containing all of the elements in this datastructure inorder.

String toString()
Returns a string representation of this datastructure, containing the String representation of each element inorder

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Members