Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 Write a method first() that creates two priority queues, {Pineapple, Pear, Quamquat, Grape, Dragon Fruit, Boysenberries} and {Pineapple, Cantaloupe, Dragon Fruit, Blueberries, Pomegrante}

Question 1

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.

Question 2

Create a method Second(), that modifies the first(), to print the list of fruits beginning with letter b.

Question 3

Write a method third(), that creates two linked hash sets, {53, 42, 65, 91, 87, 65} and {65, 93, 42, 67, 87}. Add your birthday day, to the first list. Add a number between 12 and 40 to the second list. Display their union, difference, and intersection.

Upload java source code named your Lastname.java (ex. Samplewala.java) and the run/result, fir the above 3 sub modules.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions