Palices & Regulations V Subject Outline as a tel Task 2 Value: 5 marks Problem Description:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Palices & Regulations V Subject Outline as a tel Task 2 Value: 5 marks Problem Description: Write a Java program to solve the problem presented below. You may assume that the user will always enter valid data; you do not have to perform data validation. The entry charges to a zoo are: Children 5 years old and younger free Accompanied children from 6 to 15 years old: $2 each Unaccompanied children from 6 to 15 years old: $5 each Adults from 16 to 59 years old: $10 each Seniors from 60 years and older: $8 each An accompanied child is defined as one in a family group accompanied by an adult or a senior. An adult or senior can only count as accompanying one child from 6 to 15 years old. No limit is placed on the number of children 5 years old and younger, which is perhaps a failing on the part of the zoo authorities, but simplifies your problem. Ages are integers. Your program will calculate and display the entry charge for each family group and also display the total takings for a sequence of groups. In this process it will correctly determine the number of accompanied children and those not counted as accompanied in each family group. It will request the user to enter the number of children (6 - 15 years old), the number of adults (16-59 years old) and the number of seniors (60+ years old) for each group, and it will display the entry charge for each group. The following shows a sample run. Enter a group? (Yes=1/No=0): 1 Enter the number of children (age 6-15): 5 Enter the number of adults (age 16-59): 2 Enter the number of seniors (age 60+): 1 Total entry charge is $44 Enter a group? (Yes=1/No=0): 1 Enter the number of children (age 6-15): 1 Enter the number of adults (age 16-59): 2 Enter the number of seniors (age 60+): 0 Total entry charge is $22 L Enter a group? (Yes=1/No=0): 0 Total takings: $66 You may assume that the user of the program enters the inputs Palices & Regulations V Subject Outline as a tel Task 2 Value: 5 marks Problem Description: Write a Java program to solve the problem presented below. You may assume that the user will always enter valid data; you do not have to perform data validation. The entry charges to a zoo are: Children 5 years old and younger free Accompanied children from 6 to 15 years old: $2 each Unaccompanied children from 6 to 15 years old: $5 each Adults from 16 to 59 years old: $10 each Seniors from 60 years and older: $8 each An accompanied child is defined as one in a family group accompanied by an adult or a senior. An adult or senior can only count as accompanying one child from 6 to 15 years old. No limit is placed on the number of children 5 years old and younger, which is perhaps a failing on the part of the zoo authorities, but simplifies your problem. Ages are integers. Your program will calculate and display the entry charge for each family group and also display the total takings for a sequence of groups. In this process it will correctly determine the number of accompanied children and those not counted as accompanied in each family group. It will request the user to enter the number of children (6 - 15 years old), the number of adults (16-59 years old) and the number of seniors (60+ years old) for each group, and it will display the entry charge for each group. The following shows a sample run. Enter a group? (Yes=1/No=0): 1 Enter the number of children (age 6-15): 5 Enter the number of adults (age 16-59): 2 Enter the number of seniors (age 60+): 1 Total entry charge is $44 Enter a group? (Yes=1/No=0): 1 Enter the number of children (age 6-15): 1 Enter the number of adults (age 16-59): 2 Enter the number of seniors (age 60+): 0 Total entry charge is $22 L Enter a group? (Yes=1/No=0): 0 Total takings: $66 You may assume that the user of the program enters the inputs
Expert Answer:
Related Book For
Financial Management for Public Health and Not for Profit Organizations
ISBN: 978-0132805667
4th edition
Authors: Steven A. Finkler, Thad Calabrese
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
MW Canada developed a 90-hour technical training program that was delivered over two months. Because it enabled the loom mechanics to act more independently with less downtime if the total cost was...
-
a. XYZ Corporation had 158 million shares outstanding on January 1, 2012. On February 2, 2012, it issued an additional 30 million shares to the market at the market price of$55 per share. What was...
-
Find the measures of the angles in Fig. 2.13. 1 A C- 1 5 62 6 AB || CD 3 Fig. 2.13 B D
-
Consider the following cash flow profile and assume MARR is 10 percent/year. a. Determine the ERR for this project. b. Is this project economically attractive? EOY 0 2 3 4 5 6 NCF -$100 $15 $15 $15...
-
Mutual Insurance Company of Iowa (MICI) has a major insurance office facility located in Des Moines, Iowa. The Des Moines office is responsible for processing all of MICIs insurance claims for the...
-
10. Suppose f(x) = x - 2. Use the centered difference method with h = 0.1 to approximate f'(1).
-
Glatt Inc. sells large-scale pressure vessels for the chemical industry. On 12/28/2022, a chemical plant ordered a new pressure vessel for $10,000,000. Glatt will build that vessel in 2023 and the...
-
On 1 October 2022 Pally Co acquired 90% of the ordinary shares of Sally Co by issuing 100 million shares at an agreed value of $1.60 per share and $140 million in cash. At that time (1.10.2022), the...
-
What is the role of professional licensing boards?What happens if a professional loses their license?Can they get it back?As a consumer of health care, does the licensing process give you confidence...
-
5.Calculate the volume percentage of each major component of the wet bone, based on the weight percentage, i.e. 9, 69,22 wt% for water, mineral, and organic phase, respectively. Assume the densities...
-
Setting aside any legal issues are the manager at starbucks morally responsible for worker abuse and slave labour on their supplier farms?
-
How will you measure the effectiveness of the opportunity? Consider an HR scorecard, benchmarking, dashboard, return on investment (ROI) computations, or another measurement
-
Based on what you read in the textbook, describe at least three factors can that be used to understand a culture. Describe the impact of culture, as a whole, on communication. Explain how...
-
Find the maximum number of electron in the 3rd orbit.
-
Keating & Partners is a law firm specializing in labour relations and employee-related work. It employs 25 professionals (5 partners and 20 managers) who work directly with its clients. The average...
-
Distinguish among line-item, responsibility center, and program budgets.
-
Fifteen years ago, Meals for the Homeless bought a new building for $ 600,000. They borrowed $ 500,000 on a 30-year mortgage with a 6 percent fixed rate and monthly payments. The current outstanding...
-
Is there any reason that a not- for- profit organization might decide to decline a gift?
-
What is a training objective? Write a sample training objective in behavioral terms.
-
What does a manager need to know to be sure that training provided satisfied the training objectives? How can these things be determined?
-
As an instructor, what can you do to help participants retain what they are learning?
Study smarter with the SolutionInn App