Question: Write a method first() that creates two priority queues, {Pineapple, Pear, Quamquat, Grape, Dragon Fruit, Boysenberries} and {Pineapple, Cantaloupe, Dragon Fruit, Blueberries, Pomegrante} . Add
Write a method first() that creates two priority queues, {"Pineapple", "Pear", "Quamquat", "Grape", "Dragon Fruit", "Boysenberries"} and {"Pineapple", "Cantaloupe", "Dragon Fruit", "Blueberries", "Pomegrante"}. Add to the first list a green skin fruit. Add your favorite fruit to the second list. Display their union, difference, and intersection. Note that priority queue can have duplicates. The union of two prority queues may have duplicates.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
