Question: Create an application that displays the following menu: Select a planet 1. Mercury 2. Venus 3. Earth 4. Mars 5. Exit the program. Enter your

Create an application that displays the following menu:

Select a planet

1. Mercury

2. Venus

3. Earth

4. Mars

5. Exit the program.

Enter your selection.

When the user selects a planet from the menu, the program should display data about the planet's average distance from the sun, the planet's mass, and the planet's surface temperature. Use the following data in your program.

Mercury. (Average distance from the sun: 57.9 million kilometers, Mass: 3.31 x 10^23 kg, Surface temperature: -173 to 430 degrees Celsius)

Venus. (Average distance from the sun: 108.2 million kilometers, Mass: 4.87 x 10^24 kg, Surface temperature: 472 degrees Celsius)

Earth (Average distance from the sun: 149.6 million kilometers, Mass: 5.967 x 10^24 kg, Surface temperature: -50 to 50 degrees Celsius)

Mars. (Average distance from the sun: 227.9 million kilometers, Mass: 0.6424 x 10^24 kg, Surface temperature: -140 to 20 degrees Celsius)

I need the solution in Java. Thanks so much!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!