The MidAmerica Bus Company charges fares to passengers based on the number of travel zones they cross.
Question:
The MidAmerica Bus Company charges fares to passengers based on the number of travel zones they cross. Additionally, discounts are provided for multiple passengers traveling together. Ticket fares are shown in Table 8-5.
Develop the logic for a program that accepts the number of passengers and zones crossed as input. The output is the ticket charge.
Transcribed Image Text:
Passengers 1 2 3 4 Table 8-5 0 7.50 14.00 20.00 25.00 Bus fares Zones Crossed 2 12.00 22.00 32.00 36.00 1 10.00 18.50 21.00 27.50 3 12.75 23.00 33.00 37.00
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 63% (11 reviews)
if zonesCrossed 0 if passengers 1 SystemoutprintlnThe fare is ...View the full answer
Answered By
Dennis Nyangau
I have been tutoring for several years now, and I absolutely love it! I love being able to help students one-on-one and see them succeed. It is so gratifying to see a student understand a concept that they were struggling with before. I also enjoy getting to know my students and helping them to reach their full potential.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
The base ticket price for Cloudliner Airlines is determined by the distance traveled and the day of the week a passenger is traveling. In addition, the airline adjusts its ticket prices based on a...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
ABC Company produces and sells I product. Once the products are produced, they are sold, and there is no work-in- process, no any inventory in stock. Company uses standard costing method in its...
-
A paint manufacturer is experimenting with an additive that might make the paint less chalky. To ensure that the additive does not affect the tint, a quality-control engineer takes a sample from each...
-
Flint Hills Company's most recent financial statements showed dismal performance. There was a net loss of $10,000 and the statement of cash flows showed a net cash decrease in all categories. The...
-
Determine the critical buckling load for the column. The column material can be assumed rigid. T P k ww
-
You are a senior manager responsible for overall company operations in a large courier company. Your company has 106 regional offices (terminals) scattered around the country and a main office (hub)...
-
Students are asked to assume that during an advanced degree program, they thoroughly studied and reviewed the most popular personality tests used by companies as selection techniques. Students are...
-
On January 1. Ruiz Company issued bonds as follows: Face Value: Number of Years: Stated Interest Rate: Interest payments per year 500,000 15 7% Required: 1) Calculate the bond selling price given the...
-
In golf, par represents a standard number of strokes a player needs to complete a hole. Instead of using an absolute score, players can compare their scores on a hole to the par figure. Families can...
-
a. The Palmertown Elementary School has 30 classrooms. The children in the school donate used books to sell at an annual fundraising book fair. Write a program that accepts each teachers name and the...
-
What does a factor model say about equilibrium in the marketplace?
-
Suppose we have the two JARs in the diagram on the module path and the module-info in the com.magic jar only exports one package: com.magic.unicorn. There is no module-info file in the com.science...
-
Given the original array, how many of the following for statements result in an exception at runtime, assuming each is executed independently? A. Zero. B. One. C. Two. D. Three. E. Four. F. The code...
-
Given the following program, how many times is Locked! expected to be printed? Assume 100 milliseconds is enough time for each task created by the program to complete. A. One time. B. Five times. C....
-
What statements are true about requires mandated java.base? (Choose two.) A. This output is expected when running the java --list-modules command. B. This output is expected when running the java...
-
Which of the following are modules supplied by the JDK? (Choose three.) A. java.logging B. java.javadoc C. java.jdk D. java.management E. java.naming F. java.scripts.
-
Write out a mechanism for every reaction depicted in Problem 38. (a) (b) (c) O .LiAID 2. H, H,O CH3CH O 1.LIAIH 2D D.O LiAID CH,CH>
-
Create an appropriate display of the navel data collected in Exercise 25 of Section 3.1. Discuss any special properties of this distribution. Exercise 25 The navel ratio is defined to be a persons...
-
Suppose you have declared an array as follows: int[] creditScores = {670, 720, 815}; What is the value of creditScores.length? a. 0 b. 1 c. 2 d. 3
-
If a class named Student contains a method setID() that takes an int argument, and you write an application in which you create an array of 20 Student objects named scholar, which of the following...
-
A parallel array is one that ____________. a. Holds values that correspond to those in another array b. Holds an even number of values c. Is placed adjacent to another array in code d. Is placed...
-
Simplify the expression 5 44z + 99z
-
A truck on a straight road starts from rest, accelerating at 2.00 m/s until it reaches a speed of 50.0 m/s. Then the truck travels for 51.0 s at constant speed until the brakes are applied, stopping...
-
what is GNOME? Does Ubuntu have GNOME also? Is Ubuntu only designed for system administration and developers only?
Study smarter with the SolutionInn App