Tuesday
July 29, 2014

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

Java Panel Problem - I am supose to draw a grid and center it with a 10 pix ...
computer science - Im trying to create an arraylist that's sorted but I have no ...
programming - m trying to create an arraylist that's sorted but I have no idea ...
Programming - Here is the source code for the Kitty class: public class Kitty { ...
Java - I need help putting the following trace into pseudocode 1 public class ...
Java - 1 public class testOperators 2 { 3 public static void main(String[] args...
JAVA PROGRAM SELECTION SORT USING RECURSION - JAVA PROGRAM Details: I'm having a...
Computers - //program that puts two lists in order in one single list with all ...
Computer Science - //program that puts two lists in order in one single list ...
Computer Programming - Implement the classic “Rock, Paper, and Scissors game” ...

Search
Members