Skip to content

Conversation

@ayjlee
Copy link

@ayjlee ayjlee commented Aug 16, 2017

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 is called every time I create a new class object. 'new' creates a new instance of the class, and 'initialize' will set the states for all of the instance variables related to objects of that class.
Describe an instance variable you used and what you used it for. In my Planets class, I used an instance variable called '@travel_advice', that was set to a default of "None submitted" every time a new Planet was instantiated. This provides the user with any travel advice that visitors of the planet/contributors to my planetary guide had submitted. Users can also input travel advice if they are creating a new planet and submitting an entry to my guide.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. Currently, I use an array of planets for SolarSystem, and define class methods based on the ability to iterated by index over the area. The index is the key to accessing the planets in my solar system. If I used a hash, I would have to store planets as key value pairs, and would access each planet using a key. I think I would use the planet's name as the key, and the value would be all other planetary information (stored as a hash).
Do you feel like you used consistent indentation throughout your code? yes

@tildeee
Copy link

tildeee commented Aug 20, 2017

Solar System

What We're Looking For

Feature Feedback
Created Custom Class with initialize method & instance variables. x
Used an Array to store a list of planets in the SolarSystem class. x
Readable code with consistent indentation. x
Created a pull request with your name & the template questions answered. x

@tildeee
Copy link

tildeee commented Aug 20, 2017

Your code is nicely organized. You made great helper methods that created very readable code. Your classes are small and show that they have very clear responsibilities defined. This is exactly what we're looking for!

Also, you have a really great theme for your program :)

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