3. f30-2.5 marks: Pre-Order Traversal of the BST
•
File: TaskBST.java
• Method to Complete: preOrderTraversal()

Task: Implement a method that performs a pre-order traversal of the BST. This
method should not take any parameters and must return a java.util.List<Task>
containing all the tasks from the tree. You will likely want to use a private recursive
helper method to accomplish this.
Expected example output:
>>> Testing ₤3: Traversing the BST pre-order...
--- Final State --
--- Task BST --
(T03, Fix Login_Bug, P:8)
(T05, Write_Documentation, P:4)
(T02, Update UI, P:5)
(T04, Test_New_Feature, P:7)
(T01, Deploy_Server, P:10)
(T06, Refactor Database, P:9)
4. f40-2.5 marks: Remove a Task from the BST
File: TaskBST.java
•
Method to Complete: remove(int priority)
Zoom
- FUO
•

Task: Implement the logic to remove a task from the BST based on its priority. You
must correctly handle all three cases for deletion: a node with no children, one child,
or two children. You can use as many helper functions as you want.
Expected example output:
-Initial State ---
--- Task BST ---
(T05, Write Documentation, P:4)
(T02, Update UI, P:5)
(T04, Test New Feature, P:7)
+ 100%
Close