Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE: create a program and include a snippet of your program running. Your family has decided to do a Family Dinner each week, and are

NOTE: create a program and include a snippet of your program running.

Your family has decided to do a Family Dinner each week, and are catering the event. And in honor of the holidays, for this Family Night, your family is doing a donation to your favorite charity. The amount donated will be a percentage of the total cost of the meal. The program should calculate total cost of the meal that will be catered - the costs can include both Adult and Children meals. The total combined catering costs should be calculated; and then the percentage of that total calculated.

Instructions

  • You must use at least two different arrays - These are, in effect, parallel arrays:
  • One for Adult Meals
  • One for Child Meals
  • Remember to use a "for" loop for each array
  • You should have totals in $ amount for:
  • Adult Meal costs
  • For example: class1; and class2
  • Overall totals, combining all categories
  • Percentage for the total categories - the % amount is your choice; for the program outcome shown below, 45% was used
  • Hints and Suggestions:
  • You can set your own catered meal prices - for example, adult meals are $10
  • You can set how many adults/children meals are sold in each category - for example, 3 adult meals sold
  • You can also write the program to ask the user for this input,but this is not required
  • At the end, it prints out the total dollar amount spent on sales for Adult Meals, Children Meals; and then an overall total spent. The percentage is then calculated, which is the charitable donation..

Here is what the output looks like.

image text in transcribed
Welcome to the Family Dinner Catering Service [OmMeal Sales for Adults: Adult Catered Meal Prices: $10.00 Adult Catered Meal Prices: $10.00 Adult Catered Meal Prices: $15.00 Adult Catered Meal Prices: $7.50 Total Adult Catered Meal Prices are $42.50. Meal Sales for Children: Child Catered Meal Prices: $7.50 Child Catered Meal Prices: $7.50 Child Catered Meal Prices: $8.50 Total Child Ticket sales are $23.50 Total Cost for Catered Meals are $66.00. The total donation for the Charity is $29.70. Process exited after 0. 02531 seconds with return value 0 Press any key to continue

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

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

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

1 How should the company set about marketing its products?

Answered: 1 week ago