/week-5

week-5 independent project, application to calculate a persons age on different planets based on solar years

Primary LanguageJavaScript

Specs:

Behavior: Ensure the number entered is a positive number. Input: -25 Output: "age is negative"

Behavior: Convert earth age to Mercury solar age. Input: 25 Output: 104.17

Behavior: Convert earth age to Venus solar age. Input: 25 Output: 40.32

Behavior: Convert earth age to Mars solar age. Input: 25 Output: 13.30

Behavior: Convert earth age to Jupiter solar age. Input: 25 Output: 2.11

Behavior: Calculate years left to live on Earth based on a life expectancy of 75 Earth years. Input: 25 Output: 50

Behavior: Calculate years left to live on Mercury based on a life expectancy of 75 earth years. Input: 25 Output: -86.17

Behavior: Calculate years left to live on Venus based on a life expectancy of 75 Earth years. Input: 25 Output: 6.18

Behavior: Calculate years left to live on Mars based on a life expectancy of 75 Earth years. Input: 25 Output: 127.70

Behavior: Calculate years left to live on Jupiter based on a life expectancy of 75 Earth years. Input: 25 Output: 887.39

Behavior: Calculate years past Earth life expectancy based on a life expectancy of 75 earth years. Input: 85 Output: 10

Behavior: Calculate years past Mercury life expectancy based on a life expectancy of 75 earth years. Input: 85 Output: -292.10

Behavior: Calculate years past Venus life expectancy based on a life expectancy of 75 earth years. Input: 85 Output: -68.27

Behavior: Calculate years past Mars life expectancy based on a life expectancy of 75 earth years. Input: 85 Output: 119.91

Behavior: Calculate years past Jupiter life expectancy based on a life expectancy of 75 earth years. Input: 85 Output: 1001.78

Create an age object; Ensure that the number entered for age is a positive number; Create a method that does the following: convert age to Mercury years; convert age to Venus years; convert age to Mars years; convert age to Jupiter years; compare age to life expectancy and return the difference