Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queues -- Tehut Getahun --- Solar System #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tehut
Copy link

@tehut tehut commented Feb 15, 2017

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What was the purpose of the initialize method in your class? To instruct the class on how to construct new instances of the class
Describe an instance variable you used and what you used it for. I had an instance variable @distance_from_sun and called it in another method to calculate the distance planets were from one another.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. If I'd used an array instead of a hash I would have used a shovel rather than hash notation to push my planets into the Solar System. I likely would have created them individually instead of creating them directly in the Solar System. Which, to some extent, still confuses me. My understanding currently is that they're objects that exist everywhere but the variables to call them by name are local to the Solar System class so the only way for me to interact with them is to call them on the planets outside facing instance variable @planets. Which belongs to the Solar System class.
Do you feel like you used consistent indentation throughout your code? cmd + I ftw

@PilgrimMemoirs
Copy link

Solar System

What We're Looking For

Feature Feedback
Created Custom Class with initialize method & instance variables. Well Done
Used an Array to store a list of planets in the SolarSystem class. Well Done (used hash!)
Readable code with consistent indentation. Well Done
Created a pull request with your name & a meaningful message. Well Done

With the loop to build the solar system (lines 55-57), you can use a .each instead, then just use the planet variable to do Planet.new(planet) instead of Planet.new(milky_way[index]).

Nice user interaction and testing of methods!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants