12.10 Write an equals method for the BinaryTree class. This function should return true if and only if the trees are similarly shaped and refer to equal values (every Object, including the Objects of the tree, has an equals method). 12.11 Write a static method, copy, that, given a binary tree, returns a copy of the tree. Because not every object implements the copy method, you should not copy objects to which the tree refers. This is referred to as a shallow copy

icon
Related questions
Question

12.10 Write an equals method for the BinaryTree class. This function should
return true if and only if the trees are similarly shaped and refer to equal values
(every Object, including the Objects of the tree, has an equals method).
12.11 Write a static method, copy, that, given a binary tree, returns a copy of
the tree. Because not every object implements the copy method, you should not
copy objects to which the tree refers. This is referred to as a shallow copy

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.