Question
Problem to solve: A high-end department store has chosen five customers at random and will issue each of those customers a gift card based on
Problem to solve:
A high-end department store has chosen five customers at random and will issue each of those customers a gift card based on the total the customer spent that month. The value of the gift card will be the percentage of the amount spend for that customer thus increasing the total they are credited spending. For example, Jeremy has spent $145.42 on purchases but was given a gift card worth 34.06% of the $145.42 spent ($49.53)
Help Include parallel arrays for:
oNames-will hold five names
oAmount spent-will be a randomly generated value between 0 and 500
oGift card amount-will be a randomly generated value between-and 50
oTotals-will be the sum of the amount spent and the amount determined by the gift card
percentage * the amount spent.
Help include The function code to
- ogetAmountSpent()-no parameters
- ogetGift()-no parameters
- ogetSumTotals-array parameter
- ofindLargeCustomer-array parameter
Help Modify the total button
- oCalculate the total of all customer totals
- oCalculate the average of the customer totals
- oIdentify thepersonwho has the highest current
The code that I have so far:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started