Planet: Based on the information given in tablebelow, write: •a class called Planetthat contains information (only for data members mass, diameterand density) presented in the Planetary Data. •a default constructor to initialize every data member. •a member function called setInfo(...) to set the values for all data member. •a member function called printInfo(...) that will output all information about the planet. Set this member function as const. •a main function that will simulate the instantiation of a class Planet’sobject called Mercuryand set its information according to the data in figure below. •Then, print the information about Mercuryusing printInfo(...). Save your file as MatricNo_Planet.py NOTE: i need (#) comment and explanation
Planet:
Based on the information given in tablebelow, write:
•a class called Planetthat contains information (only for data members mass, diameterand density) presented in the Planetary Data.
•a default constructor to initialize every data member.
•a member function called setInfo(...) to set the values for all data member.
•a member function called printInfo(...) that will output all information about the planet. Set this member function as const.
•a main function that will simulate the instantiation of a class Planet’sobject called Mercuryand set its information according to the data in figure below.
•Then, print the information about Mercuryusing printInfo(...).
Save your file as MatricNo_Planet.py
NOTE: i need (#) comment and explanation
![Planetary Fact Sheet - Metric
MERCURY VENUS EARTH MOON MARS
Mass (1024kg)
0.330
4.87
5.97
0.073
0.642
Diameter (km)
4879
12,104
12,756
3475
6792
Density (kg/m³)
5427
5243
5514
3340
3933](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0a639a5d-a7f9-45a7-8443-b92f3d862102%2Fae5423be-efb3-49e8-adc5-9b50990ee2ed%2Fzriku1j_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)