Final Graded Quiz :iOS App Capstone (Meta iOS Developer Professional Certificate) Answers 2026
Question 1
When defining variables and constants in Swift, is it recommended to specify the type explicitly?
❌ The compiler cannot infer the correct variable or constant type in all cases.
✅ It is better to let the compiler infer the correct type.
❌ It is not necessary to specify the type explicitly in Swift.
Explanation:
Swift has strong type inference, so explicit typing is usually unnecessary unless clarity is needed.
Question 2
What is true of the following code? (Select all)
✅ It adds 500 to firstValue and assigns the result to firstValue.
✅ It is equal to firstValue = firstValue + 500.
❌ It is replacing the contents of firstValue with 500.
Explanation:+= is a compound assignment operator.
Question 3
Which of the following is correct for performing operations between two data types?
❌ let result = x + y (Int + Float)
✅ let result = Double(x) + y
❌ let result = x + y (Int + Double)
Explanation:
Swift does not allow implicit type conversion.
Question 4
What will the following code output?
✅ Option 1
❌ Option 2
❌ Option 3
Explanation:
-
gameScore += levelScore→ 10 -
DoubleacceptsIntassignment →20.0
Question 5
What will the following code output?
❌ 30
✅ 59
❌ THEGAME’SSCOREIS 59
❌ THEGAME’SSCOREIS 30
Explanation:
-
"the game's score is ".lowercased().count = 29 -
29 + 30 = 59
Question 6
What will be the value of result?
✅ false
❌ true
❌ 7
❌ 3
Explanation:
-
(19 % 6) * 3 = 3 * 3 = 9 -
(77 % 10) = 7 -
(9 < 5)is false → whole result false
Question 7
Which results will the following code produce? (Select all)
❌ 18
❌ 19
❌ 20
❌ It will be equal to (22 % 10) * 7 + 5
Explanation:
Swift does not support ** operator, so this is a trick question.
Question 8
Which statements are true for a NSSortDescriptor? (Select all)
❌ They can be combined by using a NSCompoundSortDescriptor.
✅ They can treat foreign characters like regular ones.
✅ They can be combined by using an array.
Explanation:
Sorting multiple keys = array of NSSortDescriptor.
Question 9
Which git command shows the current state of the local working directory?
❌ git diff
✅ git status
❌ git pull
Explanation:git status shows staged, unstaged, and untracked files.
Question 10
True or False: When creating a form, you should space the input fields.
✅ True
❌ False
Explanation:
Spacing improves readability and usability.
Question 11
How does creating a user journey map help UX design?
✅ It uncovers moments of frustration and satisfaction to build empathy.
❌ Used for demographics
❌ Measures success
❌ Step-by-step instructions
Question 12
What is a critical factor in usability and learnability?
❌ Animations
✅ Consistency
❌ Interface controls
❌ Design patterns
Question 13
What is the purpose of predicate in @FetchRequest?
❌ Specifies entity
❌ Specifies sort order
✅ Specifies filtering for fetched results
Question 14
What is the benefit of creating a wireframe?
❌ Test usability
❌ Final design
✅ Defines layout, navigation flow, and interactions
❌ Final branding
Question 15
Why enable git version control for Little Lemon app?
❌ Improve performance
❌ Marketing
✅ Enable collaboration and prevent loss of work
Question 16
What is the purpose of getMenuData?
✅ Fetch menu data when user enters menu screen
❌ Validate input
❌ Post data
❌ Log activity
Question 17
What should be done after initializing persistence constant?
❌ Fetch menu
✅ Set up managedObjectContext environment variable
❌ Call getMenuData
❌ Create models
Question 18
Purpose of sorting and filtering data?
❌ Restrict access
✅ Make menu easier to search and browse
❌ Change visuals
Question 19
Which function should you create?
❌ getSortDescriptors()
❌ sortDishes()
✅ buildSortDescriptors()
❌ createSortDescriptors()
Question 20
Purpose of buildPredicate?
✅ Return an NSPredicate to filter fetched objects
❌ Sort fetched objects
❌ Delete objects
❌ Update objects
Question 21
What elements are used to filter the menu list?
❌ SegmentedControl
✅ TextField above FetchedObjects
❌ Switch
❌ Button
Question 22
Difference between synchronous & asynchronous loading?
✅ Sync blocks UI; async loads in background
❌ Both async
❌ Both reversed
Question 23
What is a flowchart?
✅ Shows steps of a process like ordering food
❌ Ordering feature
❌ Nutrition info
❌ Menu list
Question 24
Purpose of Codable?
❌ Define data types
❌ Declare properties
❌ Specify initializers
✅ Encode and decode JSON
Question 25
Why create relationships in Core Data?
❌ Add properties
❌ Easier querying
✅ Link related entities
❌ Duplicate entities
Question 26
How is Core Data different from DBMS?
❌ Simple storage only
❌ Not compatible externally
✅ Deeply tied to UI and object graph
❌ Temporary cache only
Question 27
Purpose of sortDescriptors?
❌ Filter array
✅ Sort array
❌ Reverse order
Question 28
What is NSSortDescriptor?
❌ Protocol
✅ Foundation class that defines sorting rules
❌ Built-in sort method
❌ Optional type
Question 29
UI elements in onboarding flows?
❌ Media only
❌ Visual styles
✅ Labels, buttons, progress bars, tooltips, checklists
Question 30
How does Navigation help onboarding?
❌ For experienced users
✅ Guides users step-by-step through onboarding
❌ For complex apps only
🧾 Summary Table
| Q# | Correct Answer(s) | Key Concept |
|---|---|---|
| 1 | Compiler inference | Swift basics |
| 2 | += operator | Arithmetic |
| 3 | Type casting | Swift typing |
| 4 | Output logic | Variables |
| 5 | String count | Strings |
| 6 | Boolean logic | Operators |
| 7 | Invalid operator | Swift syntax |
| 8 | Sort descriptors | Core Data |
| 9 | git status | Git |
| 10 | Form UX | UI design |
| 11 | User journey | UX |
| 12 | Consistency | Usability |
| 13 | Predicate | Core Data |
| 14 | Wireframe | UX |
| 15 | Version control | Git |
| 16 | Data fetching | App flow |
| 17 | Core Data setup | Persistence |
| 18 | Sorting/filtering | UX |
| 19 | Function naming | Swift |
| 20 | NSPredicate | Core Data |
| 21 | Filtering UI | SwiftUI |
| 22 | Async loading | Performance |
| 23 | Flowchart | UX |
| 24 | Codable | JSON |
| 25 | Relationships | Core Data |
| 26 | Core Data role | Architecture |
| 27 | sortDescriptors | Sorting |
| 28 | NSSortDescriptor | Foundation |
| 29 | Onboarding UI | UX |
| 30 | Navigation | SwiftUI |