Skip to content

Conversation

@enigmagnetic
Copy link

@enigmagnetic enigmagnetic commented Aug 16, 2017

Instead of the optional enhancements, I added a "meta" menu that displays all the star systems, so the user can choose which system to look at, and then look at planets and planet details within each star system.

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What was the purpose of the initialize method in your class? The initialize method defines the values (either default or input) for the instance variables. In my code, I also used the initialize method in Planet class to automatically add the planet to its associated SolarySystem after being created.
Describe an instance variable you used and what you used it for. One of the instance variables I used for the SolarSystem class is @planets, which stores an array of planet objects. @planets is then used to manually add a Planet to a SolarSystem , and to build the formatted planet lists (two different types).
Describe what the difference would be if your SolarSystem used an Array vs a Hash. I used an Array in SolarSystem to store the associated Planet objects. Because each Planet has its own attributes which can be accessed through class methods, I did not need that information stored within the SolarSystem object. If I had used a Hash instead, I would have been able to access the planet attributes fairly straightforwardly, but I wouldn't be able to make new planets or call methods to manipulate them.
Do you feel like you used consistent indentation throughout your code? yes

Instead of the optional enhancements, I added a "meta" menu that displays all the star systems, so the user can choose which system to look at, and then look at planets and planet details within each star system.
@CheezItMan
Copy link

Solar System

What We're Looking For

Feature Feedback
Created Custom Class with initialize method & instance variables. Check
Used an Array to store a list of planets in the SolarSystem class. Check, nice work using the class methods to keep track of all instances of the class. Creative.
Readable code with consistent indentation. Check
Created a pull request with your name & the template questions answered. Check
Summary Nice work you were really creative with the use of the class methods like .all. Very neat. It would be nice if I could just run it without having to manually create a solar system before running the program. Otherwise outstanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants