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

  Design a algorithum

Design a algorithum

  Plot the time complexity according to theoretical bounds.

Be sure to only include the time needed for sorted, excluding the time to generate the random numbers. Plot the results (input size, running time) for BubbleSort and MergeSort.

  Dynamic-programming algorithm for rod-cutting problem

Consider a modification of the rod-cutting problem in which, in addition to a price pi for each rod, each cut incurs a fixed cost of c. Give a dynamic-programming algorithm to solve this modified problem.

  Give an algorithm that takes a sequence of points

Give an algorithm that takes a sequence of points in the plane (x1, y1), (x2, y2), ...., (xn, yn) and an integer k as input and returns the best piecewise linear function f consisting of at most k pieces that minimizes the sum squared error.

  Design analgorithm that decides for each node

Design an O(n) algorithm that decides (schedules) for each node at which time slot to start sending data such that the total number of time (slots) is minimized.

  Design an adt for a two-color

Design an ADT for a two-color, double-stack ADT that consists of two stacks one "red" and one "blue" and has as its operations color-coded versions of the regular stack ADT operations.

  Unctions for doing sort, search, display, replace, delete

create functions for doing sort, search, display, replace, delete, and add. You can use dynamic memory allocation for enlarge the size of pointer array for adding a new country.

  Write an algorithm that displays the squares of the number

Using a FOR loop,I need to write an algorithm that displays the squares of the number 1 to 10to console out put

  Your implementation of an algorithm has a running time of

your implementation of an algorithm has a running time of 9n3 5n2 -7n 10. your computer scientist contractor says the

  Explaining diffie-hellman public-key algorithm

Use the Diffie-Hellman public-key algorithm to exchange secret keys.

  Design pseudo code for a program that accepts insurance data

Design a flowchart or pseudo code for the A program that accepts insurance policy data, including a policy number, customer last name, customer first name, age, premium due date (month, day, and year), and number of driver accidents in the last thr..

  Exhibit an algorithm that detects automation

Exhibit an algorithm that detects whether one finite automaton accepts a subset of the set accepted by another machine.

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