Question: A c++ coding problem. how to write the solarSystem.cpp and its main.cpp? Part 3: Solar System The last class you wi implement is called solarsystem.
A c++ coding problem.
how to write the solarSystem.cpp and its main.cpp?


Part 3: Solar System The last class you wi implement is called solarsystem. The solarsystem.hfile has been made available on Moodle. You will create your class file solarsystem.cpp. There is one constructor, one destructor, and five methods to create for the solarsystem class. One of the setter methods is an Add function. Use this method to populate the solar system arrays, one planet at a time. Use the planet class getter methods to access the data needed for the addPlanet0 method of solarsystem. Code is provided in main to test the implementation of your solarsystem class. The Part 3 code is inside of a comment block. Uncomment the comment block to unlock the Part 3 main code. When you have completed the implementation of the solarsystem class and included the solarsystem header file to the main file, the output of main should look like this The orbit of Mercury takes 0.24075 years. The diameter of Mercury is 4880 km Mercury is 0.387 AU from the Sun. The orbit of Venus takes 0.614763 years The diameter of Venus is 12 104 kim. Venus is 0.723 AU from the Sun. The orbit of Earth takes 1 years. The diameter of Earth is 12742 kim. Earth is 1 AU from the Sun. The orbit of Mars takes 1.88138 years. The diameter of Mars is 6780 km. Mars is 1.524 AU from the Sun. System name Sol Sol has 4 planets. The biggest planet is Earth The diameter of Sol is 3.048 AU
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
