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
Get step-by-step solutions from verified subject matter experts
