Question: 1. Consider the following code: struct Lesson { var difficulty: Int = 1 } var Lesson1 = Lesson() var Lesson2 = tutorial1 Lesson2.difficulty = 2
1. Consider the following code:
struct Lesson { var difficulty: Int = 1 } var Lesson1 = Lesson() var Lesson2 = tutorial1 Lesson2.difficulty = 2 |
Q. What are the values of lesson1.difficulty and lesson2.difficuilty? Would this be any different if lesson was a classs? Why or why not explain with your answer.
do in swift language
Step by Step Solution
There are 3 Steps involved in it
To address this question lets break it down step by step and provide the necessary explanation Step ... View full answer
Get step-by-step solutions from verified subject matter experts
