AdaCore University

Stars 04 - Records

Download Lab Files


  • Create a record type that holds all the information needed to describe a star, that is to say {Speed, Distance, Angle, Shape}. Replace the two array solution of the previous exercise by one array indexed by star kind and containing instances of this record.

  • Adds a Turn_Around field to the record, in order to store the object around which the star is moving, instead of forcing it to move necessary around the previous element. Have the satellite and the Moon turning around Earth.