I actively use classes, but I have never used it in practice - inheritance and polymorphism, except as learning tasks, and use classes as a generalization of variables and functions in one place ...
Interested in the question. Let's say we have a class planet. And a class solar system. In the class of the solar system there is a parameter - capacity. Suppose from 1000 to 2000 planets. The coordinates of the planets are stored in a two-dimensional array. 0 - emptiness, 1,2 ... n - planets.
0 0 1 0 2 3 0 0 5 6 0 4 0 8 0 7 Interested in the question. How can I implement:
1) Solar system generation - the number of planets, according to this number planets are created and coordinates are assigned to them
2) The parameters of the classes of the solar system and all the planets are stored in the file (ini, txt ....). And they can be downloaded from the file.
3) Generation of the solar system, namely the creation of planets also chooses which planet we choose, let's say we have a parent class Planet and child classes LivePlanet, MoonPlanet, UsualPlanet, they all have their own functions and their parameters naturally.