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: 66% (12 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...
-
Preparing a schedule of cash payments for selling and administrative expenses The budget director for Metro Cleaning Services prepared the following list of expected selling and administrative...
-
Why do managers, banks, lending agencies, owners, and potential owners need the financial information for a business?
-
The following information comes from the financial statements of Randall Stewart Company. Current assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 80,000...
-
Troy Engines, Limited, manufactures a variety of engines for use in heavy equipment. The company has always produced all of the necessary parts for its engines, including all of the carburetors. An...
-
You are the product manager of a confectionery company that includes small plastic toys with its chocolate sweets. Having met a potential Thai manufacturer of these toys at a trade fair in Europe,...
-
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...
-
Let y vary directly with x. Complete the following. Find y when x = 1.3, if y = 7.2 when x = 5.2.
-
During manufacture, Stephen notices the indicator light on one of the machines in the assembly line flashing red. He immediately recognizes this as an indication of a problem with the machine and...
-
Century - Fox Corporation s employees are eligible for postretirement health care benefits after both being employed at the end of the year in which age 6 0 is attained and having worked 2 0 years....
-
Oakey Wines has the option to lease a filling machine for the bottling of exclusive varieties that are sold in smaller volumes and require unique bottles. There are 3 options available to Oakey...
-
Design a Rust program to create a multi-threaded TCP server that can handle multiple client connections simultaneously and perform basic file I/O operations.
-
e) Evaluate It 15 f) Find distance between the points (6,-3) and (2,1) 1-11 g) Find the value of determinant A= 2 -1 1 3 2
-
How much time doing what activities do college students spend using their cell phones? A 2014 Baylor University study showed college students spend an average of 9 hours a day using their cell phones...
-
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...
-
The goal of this assignment is to demonstrate that you are able to build a logistics network. You will imagine that you run a company that markets a product on Amazon and you need to stock your...
-
content area top Part 1 A manager estimates the annual after-tax international investment free cash flow from an investment, determines its present value, and then determines it will take to recoup...
-
You are choosing between two projects. The cash flows for the projects are given in the following table ($ million): Project A B Year 0 -$51 - $100 a. What are the IRRS of the two projects? Year 1...
Study smarter with the SolutionInn App