Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2c: Create a Java program named YourName2c, so mine would be When you say you are 22 years old, you are really saying that

image text in transcribed
Part 2c: Create a Java program named YourName2c, so mine would be When you say you are 22 years old, you are really saying that the Earth has circled the Sun 22 times. Since other planets take fewer or more days than the Earth to travel around the Sun your age would be different on other planets. You can compute how old you are on other planets by using the formula: Where x is your age on Earth, y is your age on planet Y and d is the number of Earth days the planet Y takes to revolve around the Sun. Your program needs to prompt the user for their age, and displays how old they would be on Mercury, Venus, Jupiter, and Saturn. The values for d are listed in the table below: Planet d approximate number of Earth days to travel around the Sun Mercury Venus Jupiter Saturn 225 4,380 10,767 Here is an example of the output jGRASP exec: java Enter your earth age in years: 37 You are 153.465909 0909091 years old on Mercury You are 60.022222222222226 years old on Venus You are 3.08333333 33 333335 years old on Jupiter You are 1.254295532646048 years old on Saturn jGRASP: operation complete

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

Students also viewed these Databases questions

Question

Is the current human resources management system obsolete?

Answered: 1 week ago

Question

Complexity of linear search is O ( n ) . Your answer: True False

Answered: 1 week ago