Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java High Priority Students Purpose To review priority queues in Java Directions and Examples: Create a class called Student that has the following private

image text in transcribed

In Java

High Priority Students Purpose To review priority queues in Java Directions and Examples: Create a class called Student that has the following private String name; private double gpa A constructor that takes a name and gpa and initializes those fields A toString method that returns the student's name, a colon and their epa (ee. Alice: 4.0) Then write a driver program that instantiates a PriorityQueue to hold the student objects in order by their gpa (from highest to lowest). Note that you will need to create a Comparator to do this. Add [i.e "offer"1 the following students to the priority queue: Alice, 4.0 Bob, 2.7 Carol, 3.8 Dave, 3.9 Eric, 2.9 Call peek once and poll twice on the priority queue and display the resulting values. The output of your program should be Alice: 4.0 Alice: 4.0 Dave: 3.9 When your program is working, export your Eclipse project to a zip file (File->Export > General 3 Archive File) and upload it to the dropbox in Pilot. Make sure that the correct project in the Project Explorer view is selected when you do the export. You can right-click on it instead of going through the File menu to be sure

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_2

Step: 3

blur-text-image_3

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago