Question: Create a class called Planet. Store as fields the name of the planet, the gravity, and the length of the year. Create the appropriate constructors

Create a class called Planet. Store as fields the name of the planet, the gravity, and the length of the year. Create the appropriate constructors and accessors and toString. Build an array of this class. Create a program that displays the data on a planet based on user choice. For example, if the person selected Mars, then 3.71 m/s2 and 686 days

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!