Need a small code in java using couple of classes and methods.
The Solar System Model
You are going to write a class (or ideally classes - hint!) that models solar systems in a very
minimal way. Our solar systems will have:
• A name
• A series of zero or more planets each of which has
• A name
• A mass (expressed in terms of Earth-masses - so the mass of the Earth is 1.0)
• A distance from it’s star (expressed in Astronomical Units, or AU- where the Earth is 1.0
AU from the Sun)
• An orbital period expressed in years.
However, since the orbital period is a function of the distance, you will not specify the orbital period
when you create a planet - instead it will be computed (formula is below).
Hi sir, I will write the classes and methods for a solar system model with required attributes. will deliver code in an hour or two. thanks