Swift Flashcards

(14 cards)

1
Q

What is an object

A

something you can send a message to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a message

A

imperative instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is dot notation

A

object dot message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is extending an object

A

define your own message that type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what are the three object types in swift

A

class, struct, enum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is an object

A

“object” refers to a particular instance of a class where the object can be a combination of variables, functions, and data structures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is an object-based language

A

A language is usually considered object-based if it includes the basic capabilities for an object: identity, properties, and attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is an object-oriented language

A

A language is considered object-oriented if it is object-based and also has the capability of polymorphism and inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is a variable in swift

A

a variable name is a reference to an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does let do

A

declares a constant var

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what can go into the top level of a swift file

A

import statements, variable declarations, function definitions, object type declarations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is a property

A

a variable declared at the top of a class scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is a method

A

a function declared at the top of a class scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is a member of an object declaration

A

all the properties, methods and objects at the top of a class scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly