Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help with these swift questions I will thumbs up in rating !!! 1. what is an IBOutlet A) It is a variable in a

please help with these swift questions

I will thumbs up in rating !!!

1. what is an IBOutlet

A) It is a variable in a view controller that references a user interface element in Interface Builder. B)It is a method in a view controller that gets executed when a user interacts with a a user interface element in Interface Builder. C)It is the memory location of a Storyboard in Interface Builder.

2. When a Double is initialized with a String a failable initializer is called. What type is value in the following line of Swift code?

var value = Double("51.38")

A) Double B) Double! C) Double? D) String E) String? F) Void

3. Given the following OuterPlanets enumeration: enum OuterPlanets: String { case mars, jupiter, saturn, uranus, neptune } What is the rawValue for jupiter?

A) 1 B) 2 C) 5 D) j E) "jupiter" F) .jupiter

4. Given:

struct Circle { var x = 0.0, y = 0.0, width = 0.0 } var circle = Circle()

Which of the following is used to set the width property of circle to 10.0 in Swift?

A) circle["width"] = 10.0 B) circle.setWidth(10.0) C) circle.width = 10.0 D) circle->width = 10.0

5. Given: struct Font { var name: String var size: Double } Which of the following is the correct line of Swift code for creating an instance of a Font with a name of "times" and a size of 12.0?

A) let font = new Font(name: "times", size: 12.0) B) let font = Font(name: "times", size: 12.0) C) let font = Font("times", 12.0) D) let font = new Font("times", 12.0)

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_2

Step: 3

blur-text-image_3

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

What quality standards do firms use in the United States?

Answered: 1 week ago

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago