Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE ANSWER ALL PARTS! Questions in Programming in Swift. 1. When a new instance of a structure is created, properties are given a value using
PLEASE ANSWER ALL PARTS! Questions in Programming in Swift.
1. When a new instance of a structure is created, properties are given a value using a(n) a initializer c. instance method b. constructor d. computed property 2. Using structures, a programmer may a. define a custom data type redefine a primitive type in Swift b. incorporate properties and behaviors d. both a and b together c. 3. Assume a student creates an instance of a person structure called Sally. Sally's behaviors would be defined by: a. instance properties b. methods c. d. memberwise initializers none of these a. C. must be declared static 4. A computed property updates every time the object is instantiated b. allows the value of a property to be determined using the value of some other property d. must be declared constant using let a. 5. When you assign an existing structure to a variable, there is still only one object c. the existing property values are copied b. the existing property values are passed d. the property observers are called by reference -. A named group of one or more properties that make up a data type is a(n) a. initializer c. structure b. concantenation d. function c. Which of the following statements is FALSE? a. property declarations in a strcuture must be type-annotated During initialization of new instance of a structure, Swift requires that values be set for all properties Swift always provides memberwise initializers for you b. String, Int, Double and Bool are actually d. structures themsleves c. an instance method may be defined only once in a strurcture Which of the following statements is FALSE? a. A function which changes an instance property's value must be labeled mutating b. An instance method is a function that d. can be called on an instance of a type. the static keyword causes a property or function to belong to the type itself and not any instance of the type. A base class is a class that a. inherits from another class b. has multiple instances c. is at the root of its class hierarchy d. has at least one superclass a. Unlike a struct, a class never automatically provides memberwise initializers for you b. allows inheritance c. is stored in a reference variable which contains a memory location d. all of the above A subclass is a. a child of another class b. a class from which other classes inherit properties and methods c. the same thing as a base class d. all of the above Inheritance is useful because a. the programmer does not have to duplicate the work that was already done somewhere else b. it helps porgrammers organize data into categories and subsets C. it makes it easier to manage objects that are related to each other in some way d. all of the above The override keyword is used with a. code that ignores something that is inherited b. code that redefines or customizes something that is inherited C. code that implements something that is missing from a parent class d. code that prevents customization of something that is inheritedStep 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