Question: Challenge 3 - Basic Function You need to write a function in your dinner app that will display all of the costs associated with your

Challenge 3- Basic Function
You need to write a function in your dinner app that will display all of the costs associated with your dinner.
Underneath the variables below, write a function called displayCost
Inside the function create the following constants:
perPersonCost (Double) set equal to costPerHour times Double(days)
groupCost (Double) set equal to perPersonCost times Double(numberOfPeople)
tax (Double) set equal to groupCost times 0.09
total (Double) set equal to groupCost plus tax
Print total inside your function and call the function.
Remember you will need to convert your Int variables to Doubles when performing operations
Challenge 3 - Basic Function You need to write a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!