Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help !! homework in java Q1. [15 pts] Write a java program that sorts the following sequence in ascending order using in-place heap-sort algorithm. 10

Help !! homework in java image text in transcribed
image text in transcribed
Q1. [15 pts] Write a java program that sorts the following sequence in ascending order using in-place heap-sort algorithm. 10 6 15 12 13 17 16 L5 Q2. [25 pts] An airline company uses the formula shown below to determine the priority of passengers on the waiting list for overbooked flights. priority number (A 1000) B C where A is the customers total mileage in the past year B is the number of years in his or her frequent flier program C is a sequence number representing the customers arrival position when he or she booked the flight Given the information of overbooked customers as shown in the following table, write a java program that reads the customers information and determines each customers priority number. The program then builds a priority queue using the priority number and prints a list of waiting customers in priority sequence. Year Name Mileage Sequence 53,000 Bryan Devour 89,000 Amanda Trapp 93,000 Boclan Nguyen 17,000 Sarah Hong

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions