Spring Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

App-Development-with-Swift-Certified-User Questions and Answers

Question # 6

Review the code.

var capitalCities = [ " USA " : " Washington D.C. " , " Spain " : " Madrid " , " Peru " : " Lima " ]

Which two statements add the capital city of " Italy " to the dictionary? (Choose 2.)

A.

capitalCities[ " Rome " ] = " Italy "

B.

capitalCities.append([ " Italy " : " Rome " ])

C.

capitalCities[ " Italy " ] = " Rome "

D.

capitalCities = capitalCities + [ " Italy " : " Rome " ]

E.

capitalCities.updateValue( " Rome " , forKey: " Italy " )

Full Access
Question # 7

Which property wrapper allows you to read data from the system or device settings?

A.

@State

B.

@Environment

C.

@Binding

D.

@StateObject

Full Access
Question # 8

Complete the code by selecting the correct option from each drop-down list to create the following screen.

Note: You will receive partial credit for each correct answer.

Full Access
Question # 9

Review the code:

Given a struct called Animal, what line of code should be added on line 5 in order to produce the output shown?

A.

Text(Animal.name)

B.

Text(Animals[animal].name)

C.

Text(animals[animal].name)

D.

Text(animal.name)

Full Access
Question # 10

For each statement about Navigation in SwiftUI. select True or False.

Full Access
Question # 11

Review the code.

Note: You might need to scroll to see the entire block of code.

A breakpoint is set on line 3. When the application is run. it will stop at line 3. You need to debug the code. Drag each debugging control from the left to the correct instruction on the right. You will receive partial credit for each correct answer

Full Access
Question # 12

Review the code snippet.

Which statement completes the code snippet so that:

• The lastReleaseDate remains the same when nextApplePhone.releaseDate is nil.

• The lastReleaseDate updates to the nextApplePhone.releaseDate when nextApplePhone.releaseDate is NOT nil.

A.

nextApplePhone.releaseDate : lastReleaseDate

B.

lastReleaseDate : nextApplePhone.releaseDate

C.

lastReleaseDate : nextApplcPhone.rcleaseDate!

D.

nextApplePhone.releaseDate! : lastReleaseDate

Full Access