PROGRAMMING – QUESTION 2: (13 PTS) In the textbox below, Wri…
PROGRAMMING – QUESTION 2: (13 PTS) In the textbox below, Write the Swift Coding that will solve the following programming problem: Use “inferred” data declaration” for the following constant with this specific value: Bus capacity is 20. Use “explicit” data declaration for the following variables which will NOT have a decimal point: Number of Attendees. Assign a value to the name variable for Number of Attendees of your choosing between 25 – 100. Use “explicit” data declaration for the following variables that will be CALCULATED, and which will NOT have a decimal point: Number of Buses Required and Attendee Overflow Count. Using only “COMPOUND MATHEMATICAL OPERATORS”, Write the FOUR (4) individual formulas that will UPDATE the Number of Attendees after each day based on the following factors between Day #1 until Day #4: ——————————————————————————————- Day #1- The Number of Attendees are TRIPLED in attendance. Day #2- The Number of Attendees were joined/INCREASED by a party of 27 from another group. Day #3- The Number of Attendees reported that the 15 team leaders in attendance had to leave/ DECREASED. Day #4- The Number of Attendees partied all night and ONLY ¼ of the Attendees Remained! ———————————————————————————————————————- Using a “NON-COMPOUND MATHEMATICAL OPERATORS”, Write the formula that will determine the Number of Buses Required which is found by DIVIDING the Number of Attendees found on Day#4 by the Bus Capacity. ============================================================== Using only “NON-COMPOUND MATHEMATICAL OPERATORS”, Write the formula that will determine the Attendee Overflow Count which is found by “EXTRACTING” the REMAINDER when DIVIDING the Number of Attendees found on Day#4 by the Bus Capacity. PRINT the results/values for Number of Attendees after Day #4, Number of Buses Required and Attendee Overflow Count ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Read Details