Genericity

The Generic Solar_System

The purpose of this exercise is to make our solar system generic

_images/05_1.png

Expected result

Question 1

Use the code from the privacy exercise and make the solar system generic on the name and number of bodies.

Hint: make the solar system generic with one parameter which is the enumeration of bodies.

Question 2

Add a Set_Center procedure setting X and Y coordinate of the first object of your solar system.

Question 3

Add another instance of a solar system.