- Q2 Use A Priority Queue Data Structure To Implement A Java Program Which Keeps Track Of A Person S Daily Cash The Prog 1 (29.04 KiB) Viewed 21 times
Q2. Use a Priority Queue data structure to implement a java program which keeps track of a person's daily cash. The prog
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Q2. Use a Priority Queue data structure to implement a java program which keeps track of a person's daily cash. The prog
Q2. Use a Priority Queue data structure to implement a java program which keeps track of a person's daily cash. The program should proceed in the following order: a) Create an empty Priority Queue called "spent" b) Then add 100 to the empty Priority Queue c) Then add 2 to the PriorityQueue d) Then add 17 to the PriorityQueue e) Then Print the all the items in the PriorityQueue f) Then print the smallest element in the PriorityQueue (5 marks) import java.util.PriorityQueue; public class Main { public static void main(String[] args) { // Write your code below