I'm trying to write a program in java that takes user input for the size of the sun in inches and outputs a table of solar system values based on the size of the sun given in inches.  Camilla was asked by her niece, to help her with her project for the 7th grade Science Fair.  She was overjoyed to have been asked to help.  Her niece wanted to build a scale model of the solar system.  Her niece, remembers having received a planisphere in 4th grade science class.  But, she had lost it.  But, she remembered that there were instructions on the planisphere for how to build a scale model of the solar system based on the Sun being the same size as the star circle.  Her niece had always wanted to build that model and she thought that this would be the perfect Science Fair project.  Camilla remembers having seen that planisphere.  She and her niece guessed that the star circle in the planisphere was about 8 inches in diameter.     Camilla was excited because she had always been interested in space.  Her niece was excited too and wanted to get started right away.  However, she had become a lawyer because technical things and math were never her academic strength.     However, she remembered that you are studying computer science.  So, she has come to you for help.  Always looking for opportunities to serve, you accept the challenge and eagerly get right to work.   First, you do some searches and find these values on the internet: Size - diameter (miles) distance from the sun (miles) Sun 870,000   Mercury 3,000 36,000,000 Venus 7,500 67,200,000 Earth 8,000 93,000,000 Mars 4,222 141,600,000 Jupiter 86,881 483,600,000 Saturn 75,000 886,700,000 Uranus 31,760 1,784,000,000 Neptune 30,775 2,794,400,000 Pluto (dwarf) 1,400 3,674,500,000   You decide that scientific notation is the best way to represent these values in a program.  So, you create named CONSTANTS, initializing each of them to these values.    Because there is some uncertainty about the scale model size of the sun, you decide to allow the user to enter their own value in inches.    You know that you can find all of these scale sizes and distances, by setting up a ratio and solving for the unknown.    Scale size of the Sun / actual size of the Sun  = unknown scale size or distance / actual size or distance   You set up the calculations and output the planet sizes in inches and the distances in inches, feet, yards and miles.  Example output:    This program will calculate the sizes and distances for a scale model of the solar system based on the user provided size of the sun in inches. For example, enter 8 for a solar system based on an 8 inch sun.   Enter the size of the sun (in inches): 8   SCALE MODEL DIMENSIONS - sun: 8 inches                        diameter:      distance:                       (inches)       (inches)         (feet)        (yards)        (miles)         Mercury      0.0275862        331.034        27.5862         9.1954     0.00522466           Venus      0.0689655        617.931        51.4943        17.1648      0.0097527           Earth      0.0735632        855.172        71.2644        23.7548       0.013497            Mars       0.038823        1302.07        108.506        36.1686      0.0205503         Jupiter       0.798906         4446.9        370.575        123.525      0.0701846          Saturn       0.689655        8153.56        679.464        226.488       0.128686          Uranus       0.292046        16404.6        1367.05        455.683       0.258911         Neptune       0.282989        25695.6         2141.3        713.768        0.40555   Pluto (dwarf)      0.0128736        33788.5        2815.71         938.57       0.533278   Press any key to continue . . .    Camilla and her niece were surprised at the size of the model.  They had always seen the whole solar system condensed to a page in a textbook or a chart on the wall.  So, she and her niece decided to use your program to see what size of Sun would create a model that could fit in the school gymnasium (100 foot long) where the Science Fair was being exhibited.  But, that had some problems too.  So she and her niece used your program again to see what size Sun would create a model that would fit in the school’s football field.  But, that would require the judges to leave the exhibition area.       What advice will you give to Camilla and her niece for actually building the model?     So far, I assigned each vale to a double in my program. I can't seem to figure out where to go from here to get the sizes in each unit represented based on the user inches inputted. Here is the code I have so far:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I'm trying to write a program in java that takes user input for the size of the sun in inches and outputs a table of solar system values based on the size of the sun given in inches. 

Camilla was asked by her niece, to help her with her project for the 7th grade Science Fair.  She was overjoyed to have been asked to help. 

Her niece wanted to build a scale model of the solar system.  Her niece, remembers having received a planisphere in 4th grade science class.  But, she had lost it.  But, she remembered that there were instructions on the planisphere for how to build a scale model of the solar system based on the Sun being the same size as the star circle.  Her niece had always wanted to build that model and she thought that this would be the perfect Science Fair project.  Camilla remembers having seen that planisphere.  She and her niece guessed that the star circle in the planisphere was about 8 inches in diameter.    

Camilla was excited because she had always been interested in space.  Her niece was excited too and wanted to get started right away.  However, she had become a lawyer because technical things and math were never her academic strength.    

However, she remembered that you are studying computer science.  So, she has come to you for help.  Always looking for opportunities to serve, you accept the challenge and eagerly get right to work.  

First, you do some searches and find these values on the internet:

Size - diameter (miles)

distance from the sun (miles)

Sun

870,000

 

Mercury

3,000

36,000,000

Venus

7,500

67,200,000

Earth

8,000

93,000,000

Mars

4,222

141,600,000

Jupiter

86,881

483,600,000

Saturn

75,000

886,700,000

Uranus

31,760

1,784,000,000

Neptune

30,775

2,794,400,000

Pluto (dwarf)

1,400

3,674,500,000

 

You decide that scientific notation is the best way to represent these values in a program.  So, you create named CONSTANTS, initializing each of them to these values. 

 

Because there is some uncertainty about the scale model size of the sun, you decide to allow the user to enter their own value in inches. 

 

You know that you can find all of these scale sizes and distances, by setting up a ratio and solving for the unknown. 

 

Scale size of the Sun / actual size of the Sun  = unknown scale size or distance / actual size or distance

 

You set up the calculations and output the planet sizes in inches and the distances in inches, feet, yards and miles. 

Example output: 

 

This program will calculate the sizes and distances for a scale model of the solar system based on the user provided size of the sun in inches.

For example, enter 8 for a solar system based on an 8 inch sun.

 

Enter the size of the sun (in inches): 8

 

SCALE MODEL DIMENSIONS - sun: 8 inches

 

                     diameter:      distance:

                      (inches)       (inches)         (feet)        (yards)        (miles)

        Mercury      0.0275862        331.034        27.5862         9.1954     0.00522466

          Venus      0.0689655        617.931        51.4943        17.1648      0.0097527

          Earth      0.0735632        855.172        71.2644        23.7548       0.013497

           Mars       0.038823        1302.07        108.506        36.1686      0.0205503

        Jupiter       0.798906         4446.9        370.575        123.525      0.0701846

         Saturn       0.689655        8153.56        679.464        226.488       0.128686

         Uranus       0.292046        16404.6        1367.05        455.683       0.258911

        Neptune       0.282989        25695.6         2141.3        713.768        0.40555

  Pluto (dwarf)      0.0128736        33788.5        2815.71         938.57       0.533278

 

Press any key to continue . . . 

 

Camilla and her niece were surprised at the size of the model.  They had always seen the whole solar system condensed to a page in a textbook or a chart on the wall.  So, she and her niece decided to use your program to see what size of Sun would create a model that could fit in the school gymnasium (100 foot long) where the Science Fair was being exhibited.  But, that had some problems too.  So she and her niece used your program again to see what size Sun would create a model that would fit in the school’s football field.  But, that would require the judges to leave the exhibition area.    

 

What advice will you give to Camilla and her niece for actually building the model?    

So far, I assigned each vale to a double in my program. I can't seem to figure out where to go from here to get the sizes in each unit represented based on the user inches inputted.

Here is the code I have so far:

 

 

←
(14) Java - Lesson #19 - Coin X D2L Homepage - CSC1060501 Co X
C
onlinegdb.com/online_java_compiler#
Run
solarsystemscale.j...
Debug
Waiting for c.4dex.io...
Stop
8
9 public class solarsystemscale
10- {
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Share
Command line arguments:
Standard Input: Interactive Console
H Save
Online Java Compiler - online X D2L Homework Instructions - CSC x | b Home | bartleby
//Given Planet Sizes/Diameter in Miles
double SunSolarSystemSize = 8.7e5;
double MercurySolar SystemSize = 3.0e3;
double Venus Solar SystemSize = 7.5e3;
double EarthSolar SystemSize = 8.0e3;
double MarsSolarSystemSize = 4.222e3;
double Jupiter Solar SystemSize = 8.6881e4;
double SaturnSolar SystemSize 7.5e4;
double UranusSolarSystemSize = 3.176e4;
double Neptune Solar SystemSize = 3.0775e4;
double PlutoSolarSystemSize = 1.4e3;
{} Beautify
//Given Planet Distances from the Sun in Miles
Text
public static void main(String[] args) {
System.out.println("This program will calculate the sizes and distances for a scale model of the solar system based on user pr
System.out.println("");
System.out.println("Please enter the size of the sun (in inches):");
input
✩
PAY YOUR WAY
THE NAME YOUR PRICEⓇ TOOL
x +
Language Java
Go
X
Transcribed Image Text:← (14) Java - Lesson #19 - Coin X D2L Homepage - CSC1060501 Co X C onlinegdb.com/online_java_compiler# Run solarsystemscale.j... Debug Waiting for c.4dex.io... Stop 8 9 public class solarsystemscale 10- { 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Share Command line arguments: Standard Input: Interactive Console H Save Online Java Compiler - online X D2L Homework Instructions - CSC x | b Home | bartleby //Given Planet Sizes/Diameter in Miles double SunSolarSystemSize = 8.7e5; double MercurySolar SystemSize = 3.0e3; double Venus Solar SystemSize = 7.5e3; double EarthSolar SystemSize = 8.0e3; double MarsSolarSystemSize = 4.222e3; double Jupiter Solar SystemSize = 8.6881e4; double SaturnSolar SystemSize 7.5e4; double UranusSolarSystemSize = 3.176e4; double Neptune Solar SystemSize = 3.0775e4; double PlutoSolarSystemSize = 1.4e3; {} Beautify //Given Planet Distances from the Sun in Miles Text public static void main(String[] args) { System.out.println("This program will calculate the sizes and distances for a scale model of the solar system based on user pr System.out.println(""); System.out.println("Please enter the size of the sun (in inches):"); input ✩ PAY YOUR WAY THE NAME YOUR PRICEⓇ TOOL x + Language Java Go X
←
(14) Java - Lesson #19 - Coin X D2L Homepage - CSC1060501 Co X
C
onlinegdb.com/online_java_compiler#
LL
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Run
solarsystemscale.j...
Debug
Stop
Command line arguments:
Share
Standard Input: Interactive Console
H Save
GOUD LC Lui Chului Systems C
0.000,
double MarsSolar SystemSize = 4.222e3;
double Jupiter Solar SystemSize = 8.6881e4;
double SaturnSolar SystemSize = 7.5e4;
double Uranus Solar SystemSize = 3.176e4;
double Neptune Solar SystemSize = 3.0775e4;
double PlutoSolar SystemSize = 1.4e3;
Online Java Compiler - online X D2L Homework Instructions - CSC x | b Home | bartleby
//Given Planet Distances from the Sun in Miles
double MercurySolar SystemDistance = 3.6e7;
double VenusSolarSystemDistance
6.72e7;
1.416e8;
double EarthSolar SystemDistance = 9.3e7;
double MarsSolarSystemDistance
double Jupiter Solar SystemDistance = 4.836e8;
double SaturnSolar SystemDistance 8.867e8;
double Uranus Solar SystemDistance = 1.784e9;
double Neptune Solar System Distance = 2.7944e9;
double PlutoSolarSystemDistance = 3.6745e9;
}
Text
{} Beautify
ono
PICK AND PAY
THE NAME YOUR PRICEⓇ TOOL
input
QUEUE UP A
GREAT RATE!
PROGRESSIVE
x +
Language Java
Go
Transcribed Image Text:← (14) Java - Lesson #19 - Coin X D2L Homepage - CSC1060501 Co X C onlinegdb.com/online_java_compiler# LL 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 Run solarsystemscale.j... Debug Stop Command line arguments: Share Standard Input: Interactive Console H Save GOUD LC Lui Chului Systems C 0.000, double MarsSolar SystemSize = 4.222e3; double Jupiter Solar SystemSize = 8.6881e4; double SaturnSolar SystemSize = 7.5e4; double Uranus Solar SystemSize = 3.176e4; double Neptune Solar SystemSize = 3.0775e4; double PlutoSolar SystemSize = 1.4e3; Online Java Compiler - online X D2L Homework Instructions - CSC x | b Home | bartleby //Given Planet Distances from the Sun in Miles double MercurySolar SystemDistance = 3.6e7; double VenusSolarSystemDistance 6.72e7; 1.416e8; double EarthSolar SystemDistance = 9.3e7; double MarsSolarSystemDistance double Jupiter Solar SystemDistance = 4.836e8; double SaturnSolar SystemDistance 8.867e8; double Uranus Solar SystemDistance = 1.784e9; double Neptune Solar System Distance = 2.7944e9; double PlutoSolarSystemDistance = 3.6745e9; } Text {} Beautify ono PICK AND PAY THE NAME YOUR PRICEⓇ TOOL input QUEUE UP A GREAT RATE! PROGRESSIVE x + Language Java Go
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education