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 with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions