week 5 CPSC-411 Mobile Device Application Programming - Control Flow and Enumerations

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

flashcard set

Earn XP

Description and Tags

These flashcards cover key vocabulary related to control flow and enumerations in Swift programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

for-in loop

A control flow statement used to iterate over sequences such as arrays, dictionaries, or ranges.

2
New cards

while loop

A control structure that repeatedly executes a block of code as long as a specified condition is true.

3
New cards

repeat-while loop

A variant of the while loop that executes the block of code at least once before checking the condition.

4
New cards

if statement

A conditional statement that executes a block of code only if a specified condition is true.

5
New cards

switch statement

A control flow statement that evaluates a value and compares it against multiple patterns, executing the corresponding block of code.

6
New cards

continue statement

A control transfer statement that tells a loop to skip the current iteration and start the next.

7
New cards

break statement

A control transfer statement that terminates the execution of the current control flow statement.

8
New cards

Control Transfer Statements

Statements that change the order of execution in your code.

9
New cards

enum

A data type that defines a common type for a group of related values, allowing type-safe usage within the code.

10
New cards

associated values

Values that allow enumeration cases to store additional information of any type.

11
New cards

CaseIterable

A protocol that enables an enumeration to expose a collection of all its cases.

12
New cards

for-in loop

A control flow statement used to iterate over sequences such as arrays, dictionaries, or ranges.

13
New cards

while loop

A control structure that repeatedly executes a block of code as long as a specified condition is true.

14
New cards

repeat-while loop

A variant of the while loop that executes the block of code at least once before checking the condition.

15
New cards

if statement

A conditional statement that executes a block of code only if a specified condition is true.

16
New cards

switch statement

A control flow statement that evaluates a value and compares it against multiple patterns, executing the corresponding block of code.

17
New cards

continue statement

A control transfer statement that tells a loop to skip the current iteration and start the next.

18
New cards

break statement

A control transfer statement that terminates the execution of the current control flow statement.

19
New cards

Control Transfer Statements

Statements that change the order of execution in your code.

20
New cards

enum

A data type that defines a common type for a group of related values, allowing type-safe usage within the code.

21
New cards

associated values

Values that allow enumeration cases to store additional information of any type.

22
New cards

CaseIterable

A protocol that enables an enumeration to expose a collection of all its cases.

23
New cards

guard statement

A control flow statement in Swift that ensures a condition is true, or exits the current scope if false, providing an early exit.

24
New cards

Raw Values (enums)

Pre-populated values of a specific type (e.g., Int, String) that can be assigned to each case of an enumeration.

25
New cards

Labeled Statements

A way to give a loop or conditional statement a human-readable label, allowing break or continue statements to exit or skip specific outer control flow statements.

26
New cards

default case (switch)

A required case in a switch statement that matches any value not already handled by other cases, ensuring exhaustive pattern matching.