Due date: Monday, April 4.
Ex. 1 Download the following files preferably in a separate
folder than the previous homework:
earth.h
earth.cc
sun.h
sun.cc
solar.cc
trackball.h
trackball.cc
Makefile
Compile the program with the command make and run it with the command "solar". This program simulates a small part of the solar system containing the earth and the sun, the earth rotating around the sun. There's also a disk that helps identify the reference system.
The trackball is the same as in the previous homework so feel free to replace it with your own if you have a better version. This is not the object of the current homework so whatever interface you choose is fine.
a. Add two more classes to include Mars and Venus, the first one a bit farther from the sun than the earth, the latter closer. Follow the example of the earth class.
b. Add a class to represent and animate the moon which should rotate around the earth at its own speed. Make a link in the earth class to the moon (or just declare a moon object) and make the display for the earth call the display for the moon the same way that the display for the sun class calls the display for the earth.
c. (optional, 5 extra credit points) Add a class to represent and display Saturn including a ring around it. Make the plane of the ring not parallel to the rotation plane.
Notes:
Send me: all the files that you modified/added.