/* * program6.cc */ #include #include using namespace std; // Define Celestial_Body classes here void print(const Celestial_Body& cb) { // Depending on kind of celestial body, print its correspending data. Output // shall be as follows: // Helios: star, radius 696342.0 km, belongs to galaxy Milky Way // Earth: planet, radius 6371.0 km, belongs to star Helios, orbit time 365.2 days, populated // Moon: moon, radius 1737.1 km, belongs to planet Earth, orbit time 27.3 days, not populated } int main() { // Declare statically one object of each of type Star, Planet, and Moon. Use // the following data to initialize the objects (use defaults when suitable): // Star: name Helios, radius 696342.0, belongs to galaxy Milky Way // Planet: name Earth, radius 6371.0, belongs to star Helios, orbit time 365.2 days, populated // Moon: name Moon, radius 1737.1, belongs to planet Earth, orbit time 27.3 days, not populated // Call print() for each object above. return 0; }