Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write Swift Code in Xcode to read weight of a person, calculate weight on moon and display in different view controller, and same for Jupiter
Write Swift Code in Xcode to read weight of a person, calculate weight on moon and display in different view controller, and same for Jupiter in different view controller
Description: Suppose you are developing an app that calculate the weight of a person in different planets. The starting view (earth view) takes the weight of the person on earth as shown in the following screen shot. Form earth, the person can move to the moon view using a segue. While moving to the moon, earth weight is also passed from the earth view to the moon view. The moon view calculates the weight on moon and display both earth weight moon weight, and the message"I feel much lighter You won the Moon Welcome to Space Walk Ace You are on earth now Your weight in Earthis. Your weighton Moon is. Enter your weight Enter your weight - I feel much lighter Go to From the moon view, the person can go to the Jupiter or go back to the Earth using unwind segue. Similar to the transit from earth to moon, moon to Jupiter transit passes the weight on earth and moon to Jupiter. The Jupiter view then calculates the weight on Jupiter and shows the weight on moon, weight on earth, weight on Jupiter and display the message "I feel heaviert". When the person is going back to the Earth from the moon, the earth view should display the message "Coming from the moon" From the Jupiter, the person can go back to the moon or to the earth using unwind segues. Then the person comes from the Jupiter to moon view, the moon view should show the message "coming from the Jupiter". Likewise, when the person comes from the Jupiter to Earth, the earth view should show the message "Coming from the Jupiter" Note: Moon's Gravity is 1/6 th of the earth's gravity and the Jupiter's gravity is 2.4 times earth's gravity Requirements (UI Design): You are free to design your UI differently as long as the main functionality described in the lab is implemented. The image views the show the images of Moon, Earth, and Jupiter Segue and unwind segue requirements: Forward links (such as from Earth to Moon) need to be implemented using segues and backward links (from Moon to Earth) must be implemented as unwind segues. Description: Suppose you are developing an app that calculate the weight of a person in different planets. The starting view (earth view) takes the weight of the person on earth as shown in the following screen shot. Form earth, the person can move to the moon view using a segue. While moving to the moon, earth weight is also passed from the earth view to the moon view. The moon view calculates the weight on moon and display both earth weight moon weight, and the message"I feel much lighter You won the Moon Welcome to Space Walk Ace You are on earth now Your weight in Earthis. Your weighton Moon is. Enter your weight Enter your weight - I feel much lighter Go to From the moon view, the person can go to the Jupiter or go back to the Earth using unwind segue. Similar to the transit from earth to moon, moon to Jupiter transit passes the weight on earth and moon to Jupiter. The Jupiter view then calculates the weight on Jupiter and shows the weight on moon, weight on earth, weight on Jupiter and display the message "I feel heaviert". When the person is going back to the Earth from the moon, the earth view should display the message "Coming from the moon" From the Jupiter, the person can go back to the moon or to the earth using unwind segues. Then the person comes from the Jupiter to moon view, the moon view should show the message "coming from the Jupiter". Likewise, when the person comes from the Jupiter to Earth, the earth view should show the message "Coming from the Jupiter" Note: Moon's Gravity is 1/6 th of the earth's gravity and the Jupiter's gravity is 2.4 times earth's gravity Requirements (UI Design): You are free to design your UI differently as long as the main functionality described in the lab is implemented. The image views the show the images of Moon, Earth, and Jupiter Segue and unwind segue requirements: Forward links (such as from Earth to Moon) need to be implemented using segues and backward links (from Moon to Earth) must be implemented as unwind seguesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started