Question
Exercise 4 When we talk about data in the universe, we get large numbers when we use ordinary units. Astronomers often use units other than
Exercise 4 When we talk about data in the universe, we get large numbers when we use ordinary units. Astronomers often use units other than kg and km when we talk about mass and radius in the universe. They have therefore defined units that are related to larger objects in our own solar system. For planets you have the unit Jupiter Mass (Mjup or MJ) for mass, and Jupiter Radius (Rjup or RJ) for size. For stars, you have the unit Solar Mass (Msun or M) for mass, and Solar Radius (Rsun or R) for size. The dataset you have been given is in these units. The relationship for these is as follows: Astronomical Unit "ordinary" units 1 Mjup / MJ 1.8981027kg (1.898E27) 1 Rjup / RJ 71 492 km 1 Msun / M 1.988921030kg (1.98892E30) 1 Rsun / R 695 700 km Add a method that returns the radius in km for a Planet. Add a method that returns mass in kg for a Planet. Add a method that returns the radius in km for a Star. Add a method that returns mass in kg for a Star. Venus will have a radius of 6051.8 km and a mass of 4,867E24 kg. What will be the radius in km and mass in kg for "Saturn"? What will be the radius in km and mass in kg and for our star "Sun"? Use the methods you have created to print this in Main.java. Exercise 5 We want to be able to find surface Gravity (g) for a Planet, create a method that calculates and returns this based on the formula: Image result for surface gravity formula G = Gravity constant - 6.67408 10-11 m3kg 1s 2 (6.67408E-11) ie approx. number: 0.0000000000667408 M = The mass of the planet (the formula uses kg here) R = Radius of the planet (the formula uses meters here) Surface gravity on Saturn becomes 11.185248866725233 m / s2. What will be the surface gravity of Neptune? Use the method you created to print this in Main.java. Exercise 6 We want to be able to retrieve the largest and smallest planet in a PlanetSystem. The comparison must first be made based on the radius, if the radius is equal the mass must be compared. The methods (one for each) should return the planet. Create methods that do this, use these and print information about the planets in Main.java.
Step 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