Required Tasks 1. For a given Heap class, implement Heap Sort and test heap sort by using 2 different test cases (30 points) 2. For a given Heap class, Implement Priority Queue and test priority queue. (use adaptor design pattern) (30 points) 3. Observe the sorting result of question 1. If the sorting results are from smallest to largest, modify the heap class and/or heap sort class, so that the sorting results are from largest to smallest. Vice versa. (40 points)

icon
Related questions
Question

answer using java 

Required Tasks
1. For a given Heap class, implement Heap Sort and test heap sort by using 2 different test cases
(30 points)
2. For a given Heap class, Implement Priority Queue and test priority queue. (use adaptor design
pattern) (30 points)
3. Observe the sorting result of question 1. If the sorting results are from smallest to largest,
modify the heap class and/or heap sort class, so that the sorting results are from largest to
smallest. Vice versa. (40 points)
Transcribed Image Text:Required Tasks 1. For a given Heap class, implement Heap Sort and test heap sort by using 2 different test cases (30 points) 2. For a given Heap class, Implement Priority Queue and test priority queue. (use adaptor design pattern) (30 points) 3. Observe the sorting result of question 1. If the sorting results are from smallest to largest, modify the heap class and/or heap sort class, so that the sorting results are from largest to smallest. Vice versa. (40 points)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer