Question about flight function

Assignment Help Basic Computer Science
Reference no: EM1380797

Question: An airline vice president in charge of operations requires to determine whether the current estimates of flight times are accurate. because there is a larger possiblity of variations due to wether and air traffic in the longer flights, he permits a larger error in the time estimates for them. He compares an actual flight time with the estimated flight time and considers the estimate to be too large, acceptable, or too small, depending on the following table of acceptable error margins:

Estimated flight time in minutes Acceptable error margin in minutes
0-29 1
30-59 2
60-89 3
90-119 4
120-179 6
180-239 8
240-359 13
360 or more 17

For example, if an estimated flight time is 106 mins, the acceptable error margin is 4 mins. Thus, the estimated flight time is too large if the actual flight time is less than 102 mins, or the estimated flight time is too large if the actual flight time is greater than 110 mins; otherwise, the estimate is acceptable.
Write a function that uses a switch statement to determine the acceptable error for a given estimated flight time, according to this table. Use the function in a program that reads an estimated flight time and an actual flight time and then determines whether the estimated time is too large, acceptable, or too small. If the estimated flight time is too large or too small, the program should also print the amount of the overestimate or underestimate.

Reference no: EM1380797

Questions Cloud

Estimate the marginal return : Estimating the Marginal Return to Schooling Suppose Carl's wage-schooling locus is given by the following schedule and Human Capital Investment
Calculation for programming and machine independency : Assume f is a function that returns the result of reversing string of symbols given as its input, and g is a function that returns concatenation of the 2-strings given as its input. If x is the string abcd,
Create a program that reads number of dooflingies : The shipping clerk at Rinky Dooflingy Corporation is faced with the problem: Dooflingies are very deilicate and must be shipped in special containers.
Function that uses a switch statement : To locate nearest numbered cross street for a given avenue address, the following algorithm can be used: cancel last diget of the address, divide by two,
Question about flight function : An airline vice president in charge of operations requires to determine whether the current estimates of flight times are accurate. because there is a larger possiblity of variations due to wether and air traffic in the longer flights.
Describe any other factors you would consider in making : Describe any other factors you would consider in making a decision to continue or discontinue doing business with this organization. State the process you would follow to make your decision, provide your decision, and explain the decision making s..
Discuss the process you would apply to determine : Discuss the process you would apply to determine whether the procedure falls within the RN scope of practice and how you would go about introducing the new procedure with physicians and fellow nurses.
Creating an oracle : The clique problem itself is NP-hard. Thus you may not wish to have an oracle that runs in exponential time. Consider approach to approximate the solution.
Boreki reviews the classification and then places item : How can Boreki use this information? Boreki reviews the classification and then places item A2 into the A category. Why might he do so?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Compute number of total bits needed to implement cache

Suppose a computer's address size is K bits (using byte addressing), the cache size is k bits (using byte addressing), the cache size is S bytes. Compute the number of total bits needed to implement the cache.

  Tradeoffs involved to improve overall system performance

What are your thoughts on the tradeoffs involved when attempting to improve overall system performance. Provide examples where an increase in the performance of one resource.

  How much of program-s time slice can be spent waiting

Desired data to rotate around to the read/write head, how much of a program's time slice can be spent waiting for a read operation from a disk to take place?

  Explain daytime processing load

Assume daytime processing load consists of 60% CPU activityand 40% disk activity. Your customers are complaining that the system is slow. Which would you select to yield best performance improvement for least amount of money?

  Ratio of the frequency of the second processor to first one

The frequency of the processor is proportional to the voltage at which it is run. Considering only dynamic power, what will be the ratio of the frequency of the second processor to the first one?

  Type of distribution students like to see to earn good grade

What type of distribution would the students like to see in order to be most likely to earn a good grade? Explain your answers.

  Converting value stored in register to string representation

For this part of lab exercise, determine problem of converting value stored in a register to string representation of that value in decimal form.

  Structured analysis and object-oriented techniques

A frequently asked question is "Can structured techniques and object-oriented techniques be mixed?

  Condition to resume sending messages related to application

Give an example that illustrates why P must not be allowed to do so and state a condition that defines when P may resume sending messages related to application.

  Find levels resulting tree have if key compression is used

How many levels would resulting tree have if key compression is used and it decreases the average size of each key in the entry to 10 bytes?

  Explain whetherucita should or should not be adopted

What are your arguments in support of these points? You really did not answer the question as these don't really explain whether you believe the UCITA should or should not be adopted.

  Explaining service strategy or service design

Select a topic that most interests you from Service Strategy or Service Design and then write a paper around that topic. Try to use as much of your own creativity and originality when writing the paper.

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