Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help. write the code using Xcode Use Xcode playground to solve the following two problems 1. Create an Xcode playground or main.swift and named
please help. write the code using Xcode
Use Xcode playground to solve the following two problems 1. Create an Xcode playground or main.swift and named project file Exam1Part2. Use comments to separate each problem 1. Problem 1 - Reward amount Use a combined If-else-if statements to calculate Customer's Reward amount. The reward amount is based on customer's membership type and total monthly purchase amount, as shown in the following table Membership type Total monthly purchase (S) Reward amount 's Standard : Less than 75 75-150 Over 150 Less than 200 200 and over 5% of the total monthly purchase 7.5% of the total monthly purchas 10%ofthe total monthlypurchases 4% of the total monthly purchase 15% of the total monthly purchase - (P) Premium Here are the variables declarations and value to test your code. Display the reward amount using print() statement var memberType Character "S var monthlyPurchase Double 500 var rewardAmount 0.0 Use Xcode playground to solve the following two problems 1. Create an Xcode playground or main.swift and named project file Exam1Part2. Use comments to separate each problem 1. Problem 1 - Reward amount Use a combined If-else-if statements to calculate Customer's Reward amount. The reward amount is based on customer's membership type and total monthly purchase amount, as shown in the following table Membership type Total monthly purchase (S) Reward amount 's Standard : Less than 75 75-150 Over 150 Less than 200 200 and over 5% of the total monthly purchase 7.5% of the total monthly purchas 10%ofthe total monthlypurchases 4% of the total monthly purchase 15% of the total monthly purchase - (P) Premium Here are the variables declarations and value to test your code. Display the reward amount using print() statement var memberType Character "S var monthlyPurchase Double 500 var rewardAmount 0.0Step 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