Question: 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.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
