Question
1. If a method alters a property of a struct's instance it must be declared as a __________ method. A. computed B. mutating C. observer
1. If a method alters a property of a struct's instance it must be declared as a __________ method.
A. computed
B. mutating
C. observer
D. static
2. The keyword "self" used within a class or struct refers to...
A. all instances based on the class or struct.
B. the name of the class or struct.
C. the data type of an instance property.
D. the current instance.
3. A class should be used instead of a struct when...
A. methods are needed on the instance.
B. there will be multiple instances in the program.
C. properties are needed on the instance.
D. inheritance is required.
4. A class that inherits from another class is called a...
A. struct.
B. inherited class.
C. subclass.
D. parent class.
E. base class.
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