Tree2
) Include a method that will multiply by three every node of the tree:
public void triple() { ... }
For example, the tree
t = 3
/ \
/ \
4 5
/ \ / \
6 7 8 9
after doing
t.triple();
should become
9
/ \
/ \
12 15
/ \ / \
18 21 24 27
print("code sample");
View Answers
Related Tutorials/Questions & Answers:
Tree2Tree2 ) Include a method that will multiply by three every node of the tree:
public void triple() { ... }
For example, the tree
t = 3
Adding Line to JTree_TO_REPLACE_1
This program creates a box and two trees (tree1 and
tree2). These trees...);
JTree
tree2 = new JTree();
JScrollPane scroll2 = new JScrollPane(
tree2);
box.add
Advertisements