6th node. Output in the file f2.txt must be the following:
(C,9,8) (D,6,3) (E,8,5) (F,5,4) (1,4,9)
(C,9,8) (D,6,3) (E,8,5) (X,1,2) (F,5,4) (1,3,4) (1,4,9)
1
void f3() - Find the second node having rate<6 then change its' wing to 99. Output in the file f3.txt must be the following:
(C,8,6) (D,3,5) (E,9,2) (F,5,8) (G,9,7) (H,6,8) (1,7,3)
(C,8,6) (D,3,5) (E,9,2) (F,5,99) (G,9,7) (H,6,8) (1,7,3)
void f4() - Sort from beginning to the first max rate ascendingly rate. The content of the output file f4.txt must be the following:
(C,1,2) (D, 10,3) (E,2,15) (F,11,6) (1,6,14) (J,11,15) (Κ,7,9)(C,1,2) (E,2,15) (D,10,3) (F,11,6) (1,6,14) (J,11,15) (Κ,7,9)
Question 2: (4 marks)
In this question you should complete some methods in BSTree.java file.
The class Bird with 3 data members: type, rate and wing is given and you do not need to edit it. The BSTree class is a binary search tree of Bird objects. The variable wing is the key of the tree, thus it must be unique. The following methods should be completed:
Zoom
100%
Close