Question: Program is in Swift, please explain. Thank you! Exercise Structs, Instances, and Default Values Imagine you are creating some kind of app for monitoring location.

Program is in Swift, please explain. Thank you!
Exercise Structs, Instances, and Default Values Imagine you are creating some kind of app for monitoring location. Create a GPS struct with two variable properties, latitude and longitude, both with default values of 0.0. 6 struct GPS var latitude: Double 0.0 var longitude: Double 0.0 10 Now imagine you are making a social app for sharing your favorite books. Create a Book struct with four variable properties: title, author, pages, and price. The default values for both title and author should be an empty string pages should default to 0, and price should default to 0.0 16 Create a variable instance of Book called favoriteBook without supplying any arguments. Print out the title of favoriteBook. Does it currently reflect the title of your favorite book? Probably not. Change all four properties of favoriteBook to reflect your favorite book. Then using the properties of favoriteBook, print out facts about the book 20 21 page 1 of 10 | Next: App Exercise- Workout Tracking 23
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
