Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a c + + program that calculates an after - school package for kids between 4 and 1 2 years - old. The program

Write a c++ program that calculates an after-school package for kids between 4 and 12 years-old. The
program should have the following function:
- one function to collect and return the childs name.
- one function to collect and return the childs age. The age must be between 4 and 12,
inclusive. Any other ages, the program will be terminated and return a message as:
Your child ______ does not qualified of the program! Thank you!
- One function asking the user to pick and schedule. The function prompts a message as:
The function returns the picked schedule as 1 or 2
- One function to calculate the after-school package price using the childs age and picked
schedule as:
Age Member fee
(Weekly fee)
Add snack
(Weekly fee)
Schedule 1
3:30pm -5:30pm
(per day)
Schedule 2
3:30pm -6:30pm
(per day)
4-6
$80.50
$25.75 $ 20.50 $26.50
7-8 $31.25 $ 19.00 $25.00
9-10
$58.25
$34.00 $ 18.50 $24.50
11-12 $35.50 $ 17.25 $22.25
Package price (before tax)= Member fee + Add snack + schedule*5
Each package must add a NY tax of 8.875%=0.08875. The NY tax must be
set as a global constant.
Total package price = Package price + NY Tax
After the calculation, the function returns the total package price.
- One function to prompt result as:
The total program price for _____ is $_______
The main() function is used to call and link data from one function to another.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago

Question

Define Management by exception

Answered: 1 week ago