Expected example output:
>>>Testing fl: CompletionQueue isEmpty() and enqueue()
Is queue empty initially? Yes
Enqueuing two tasks...
Is queue empty now? No
Final Queue State:
--- Completion Queue ---
(C01, Completed A, P:99)
(C02, Completed B, P:100)
2. f20 2.5 marks: Insert a Task into the Binary Search Tree
•
File: TaskBST.java
• Method to Complete: insert(Task task)
• Task: Implement the logic to insert a new Task object into the Binary Search Tree.
The tree must be ordered based on the priority of the task. If a task with the same
priority already exists, you can ignore the new task. The output is printed in in-order
traversal.
Expected example output:
>>> Testing f2: Inserting tasks into BST...
--- Final State ---
---Task BST -
(T05, Write Documentation, P:4)
(T02, Update UI, P:5)
(T04, Test_New_Feature, P:7)
(T03, Fix Login_Bug, P:8)
(T06, Refactor_Database, P:9)
(T01, Deploy_Server, P:10)
3. f30-2.5 marks: Pre-Order Traversal of the BST
•
File: TaskBST.java
Method to Complete: preOrderTraversal()
Zoom
- FUO
+ 100%
Close