Answered step by step
Verified Expert Solution
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
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 sureStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started