Write program that determine each customers priority number

Assignment Help Data Structure & Algorithms
Reference no: EM131159622

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 customer's 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 customer's arrival position when he or she booked the flight

Given a file of overbooked customers as shown in Table 9-2, write a program that reads the file and determines each customer's priority number. The program then builds a priority queue using the priority number and prints a list of waiting customers in priority sequence.

Name

Mileage

Year

Sequence

Bryan Devour

53,000

5

1

Amanda Trapp

89,000

3

2

Boclan Nguyen

93,000

3

3

Sarah Hong

17,000

1

4

Warren Raxrcod

72,000

7

5

Jorge Gonzales

65,0000

2

6

Paula Hong

34,000

3

7

Lou Mason

21,000

6

8

Stave Chu

42,000

4

9

Dave Lightfoot

63,000

3

10

Joanne Brawn

33,000

2

11

 

Reference no: EM131159622

Questions Cloud

Discuss future of criminology and criminal justice policies : iscuss the future of criminology and criminal justice policies. -  Be specific using examples of programs and policies to illustrate your points.
Leadership style and preferences : To help you to discover your own leadership style and preferences, the self-assessment exercises will prompt you to identify personal knowledge by self-reflection and provide a foundation for developing leadership skills. There is not any right or..
Description of the organization and its primary stakeholders : A description of the organization and its primary stakeholders. Include the vision and mission statement if they are available to the public, and the code of ethics if the company has one (if it is long, an excerpt or description is an acceptable alt..
Determine the expected completion time : Determine the expected completion time and the variance for each activity. Determine the total project completion time and the critical path for the project. Determine Early Start (ES), Early Finish (EF), Late Start (LS), and slack for each activity
Write program that determine each customers priority number : write a program that reads the file and determines each customer's priority number. The program then builds a priority queue using the priority number and prints a list of waiting customers in priority sequence.
Antitrust laws-sherman act and the clayton act : The Antitrust Laws (like the Sherman Act and the Clayton Act) Establish minimum fuel economy standards for an entire manufactured fleet of automobiles. Protect the consumer (generally by promoting competition in the marketplace)
Write a summary of the article : Write a summary of the article. Include the purpose for the article, how research was conducted (if any), the results, and other pertinent information
Firms are submitting bid to offer their firm services : Suppose n firms are submitting a bid to offer their firm’s services. Your cost of providing the service is c. All of the firms will submit sealed bids. The procurement officer will look at all ofthe bids and select the lowest bid but pay to the lowes..
Assignment-bangor family case : In order to ensure that a physician practice performs well financially and operationally one aspect that must be considered is the compensation methodology chosen to pay the physician.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Question about java hashtables

Prompt the user for a string, and display the corresponding number. For example, if the user types "five", the program would output "5". This must be done using the hashtable as created in the previous step.

  Process in which cpu must undertake to read a value from me

On the von Neumann, describe the process that the CPU must undertake to read a value from memory and to write a value from memory and to write a value to memory in terms of what is put into the MAR, MBR, address bus, data bus, and control bus

  A multinational tour operator agency has gained new

a multinational tour operator agency has gained new business growth in the north american market through the use of

  Java program to find largest and smallest numbers

Create a Java program that will search a text document of strings representing numbers of type int and will write the largest and the smallest numbers to screen.

  Definition and purpose of normalization

Explain how 3rd Normal Form can reduce insert, update and delete anomalies

  Dbms and data mining to imporve customer service

Discuss how a database management system and data mining can help motor vehicle maintenance center improve its services, and what tables would be required in such a database.

  Show how the box can be used to factor n

That is, given a quadratic residue y, the box outputs an x with x2 = y (equation is modulo n). Show how the box can be used to factor n.

  What is the annual compound interest rate

What is the annual compound interest rate

  What is the running time of your algorithm

Give an ef?cient algorithm to determine if there exists an integer i such that Ai = i in an array of integers A1

  How to assess runtime of recursive algorithms

Design a recursive O(n) algorithm that checks whether the given sorted array contains two equal elements. Remark. In this module we do not systematically learn how to assess runtime of recursive algorithms.

  Write algorithm to find schedule obtains maximum amount

Write down algorithm to find schedule which obtains maximum amount of profit, assuming that all processing times are integers between 1 and n. Determine running time of your algorithm.

  Write algorithm for program to compute the sum of number

Write an algorithm for a program which will satisfy following requirements: - Asks a user how many numbers they want to calculate.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd