Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Next Page Page 3 of 3 Question 2 (2 points) Assume that GameScore is an Int-type variable and you want to display GameScore in your

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Next Page Page 3 of 3 Question 2 (2 points) Assume that GameScore is an Int-type variable and you want to display GameScore in your app via Score, which is UlLabel. Which one is the correct syntax to do this process? 4 Score.show(String(GameScore)) 7 Score-GameScore 10 O Score.show(GameScore) O Score.text=String(GameScore) 13 16 Question 3 (2 points) Which one is false regarding given code snippet? 19 let paths = Bundle.main.paths(forResourcesOfType: "Ping", inDirectory: "Numberions") for path in paths 22 if path.hasSuffix("png") { print(path)) hasSuffix() is a method defined over string variables. Which one is true regarding below swift code? class ViewController: UIViewController, DataPass! var GameType: Int = 0 var NoCorrect = 0 3 4 -- ViewController class is child of UIViewController protocol. NoCorrect is IBAction variable 10 GameType is IBOutlet variable. 13 ViewController class complies with DataPass protocol. 16 Question 5 (2 points) Which one correcly defines a text box to be connected to a user interface component in storyboard? 19 22 var weight: UlTextField! let weight: UlTextField! var UlTextField! Is this syntaxtically true in swift? var correctAnswer: String! = nil No, compile error Yes, it is true 3 4 1 7 6 Question 7 (2 points) Which one is true regarding below if-statement? if BMIC >= 25 (BMILabel.textColor=UIColor.redo ) else { BMILabel.textColor=UIColor.blue) 9 10 12 13 15 16 BMILabel is a UlLabel type component. BMIC is a String type. The code snippet does not compile because of missing semicolons. red is an instance in UIColor class. The code snippet does not compile because of missing parenthesis. 18 19 21 22 Question 8 (2 points) An iOS application stores all of resources in its O properties Question (2 points) The data stored in a constant variable can only be retrieved but cannot be modified. True False Question 10 (2 points) What will be the output of the following code? 7 var z:Float 10 var s:String = "0.99" z = Float(s)! 13 z + 1.0 print(z) 16 Compiler Error because of data type mismatch 19 O 0.99 22 1.0 Syntax Error! 1.99

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions