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: 69% (13 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...
-
The tapered aluminum pin fin shown in Figure P3-72 is circular in cross section with a base diameter of 1 cm and a tip diameter of 0.5 cm. The base is maintained at 200C and loses heat by convection...
-
6.7 .034 E
-
ETA Company had a remaining credit balance of $20,000 in its under- and over-applied factory overhead account at year-end. The balance was deemed to be large and, therefore, should be closed to Work...
-
Explain the CAPM model. Find the betas of two firms and discuss whether the betas are what you would expect. Then discuss how the returns could be calculated based on the CAPM model. Be sure to state...
-
Richard chooses technique 0 and 2 requiring 10+10-20 efforts and provising 10+11=21 benefits. Hence, 21 is returned as the output Example 2: input1: 3 input2: (10,10,10,10) input3: (10,11,12,15)...
-
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...
-
A random sample of 150 observations was classified into the categories shown in the following table: a. Do the data provide sufficient evidence that the categories are not equally likely? Use a =...
-
At March 31, account balances after adjustments for Vizzini Cinema are as follows: Account Balances Accounts Cash Supplies Equipment (After Adjustment) $11,000 4,000 50,000 Accumulated...
-
2. "A student holds a thin aluminum pie pan horizontally 2 m above the ground and releases it. Using a motion detector, she obtains the graph shown in Figure P3.12. Based on her measurements, (a)...
-
Mark has two sticks, 25 inches, and 20 inches. If he places them end-to-end perpendicularly, what two acute angles would be formed when he added the hypotenuse?
-
A wedding website states that the average cost of a wedding is $29,205. One concerned bride hopes that the average is less than reported. To see if her hope is correct, she surveys 36 recently...
-
2. (10 pts each) Use partial fractions decomposition and the tables to find the inverse z- transform of each of the following: a. X(z)= 6z-z z3-4z2-z+4 4z2 b. G(z)=- (z-1) (z-0.5) 3z +1 c. X(z) =...
-
Beggin Corporation had $100,000 of regular taxable income in 2017. It had $40,000 of positive adjustments and a $50,000 preference item. What was the corporations alternative minimum tax liability...
-
For the following exercises, write the polynomial function that models the given situation. Consider the same rectangle of the preceding problem. Squares of 2x by 2x units are cut out of each corner....
-
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...
-
Just work out the assignment on your own sheet, you dont need the excel worksheet. Classic Coffee Company Best friends, Nathan and Cody, decided to start their own business which would bring great...
-
Financial information related to the proprietorship of Ebony Interiors for February and March 2019 is as follows: February 29, 2019 March 31, 2019 Accounts payable $310,000 $400,000 Accounts...
-
(b) The directors of Maureen Company are considering two mutually exclusive investment projects. Both projects concern the purchase of a new plant. The following data are available for each project...
Study smarter with the SolutionInn App