Question: Implement these methods for an Arrayed Binary Tree When the class already has these methods: obtain ( I y ) insert ( I x )

Implement these methods for an Arrayed Binary Tree
When the class already has these methods:
obtain(I y)
insert(I x)
deleteItem()
delete(I x)
has(I y)
membershipEquals(I x, I y)
search(I x)
before()
after()
goForth()
goFirst()
restartResearches()
resumeResearches()
currentPosition()
goPosition()
@Override
public void goBefore(){
// TODO - Implement this method
}
@Override
public void goAfter(){
// TODO - Implement this method
}
/**
* Move the cursor to the parent of the current node.
* @precond Current node is not the root.
* @throws InvalidState280Exception when the cursor is on the root already.
*/
public void parent() throws InvalidState280Exception {
// TODO - Implement this method
}
/**
* Move the cursor to the left child of the current node.
*
* @precond The tree must not be empty and the current node must have a left child.
* @throws ContainerEmpty280Exception if the tree is empty.
* @throws InvalidState280Exception if the current node has no left child.
*/
public void goLeftChild() throws InvalidState280Exception, ContainerEmpty280Exception {
// TODO - Implement this method
}
/**
* Move the cursor to the right child of the current node.
*
* @precond The tree must not be empty and the current node must have a right child.
* @throws ContainerEmpty280Exception if the tree is empty.
* @throws InvalidState280Exception if the current item has no right child.
*/
public void goRightChild() throws InvalidState280Exception, ContainerEmpty280Exception {
// TODO - Implement this method
}
/**
* Move the cursor to the sibling of the current node.
*
* @precond The current node must have a sibling. The tree must not be empty.
* @throws ContainerEmpty280Exception if the tree is empty.
* @throws InvalidState280Exception if the current item has no sibling.
*/
public void goSibling() throws InvalidState280Exception, ContainerEmpty280Exception {
// TODO - Implement this method
}
/**
* Move the cursor to the root of the tree.
*
* @precond The tree must not be empty.
* @throws ContainerEmpty280Exception if the tree is empty.
*/
public void root() throws ContainerEmpty280Exception {
// TODO - Implement this method
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!