Q:

Design a nested structure to store information on constellations for a rocket design company. Each structure should store the constellation’s name and information on the stars in the constellation

0

Design a nested structure to store information on constellations for a rocket design company. Each structure should store the constellation’s name and information on the stars in the constellation. The structure for the star information should include the star’s name, core temperature, distance from the sun, and whether it is a binary star or not. Create variables and sample data for your data structure.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 constellations(4) = struct('name','Ursa Major',... 

'stars',struct('name','Dubhe','CoreTemp',4500,...

'DistFromSun',124,'Binary', 'yes'));

constellations(3) = struct('name','Ursa Minor',...

'stars',struct('name','Polaris','CoreTemp',6000,...

'DistFromSun',430,'Binary', 'yes'));

constellations(2).stars(2) = struct('name',...

'Mizar','CoreTemp',9600,'DistFromSun',78,'Binary','yes');

constellations(1).stars(2) = struct('name',...

'Kochab','CoreTemp',4000,'DistFromSun',126,'Binary','no');

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now