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

Ashton's Solar System #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Ashton's Solar System #44

wants to merge 1 commit into from

Conversation

ashtn
Copy link

@ashtn ashtn 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? The initialize method is what actually constructs/initializes the data structure. Could I use the word activate here?
Describe an instance variable you used and what you used it for. I used an instance variable @name in the Planet class and in the Solar System. I used @name in both classes to define a method that would return a name associated with that instance variable within the respective class. If I used @name in the planet class, it would refer to the name of the planets - like in a print_planet method. If I used the instance variable @name in the solar system class, it would refer to the name of the instance of the solar system.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. If my solar system used an Array, in order to access the planet instances passed into the array, I would need to iterate over the array or access the planet objects from a specific index position in the array. When using a hash I could quickly access the Planet objects via their associated keys.
Do you feel like you used consistent indentation throughout your code? yes

@kariabancroft
Copy link

Solar System

What We're Looking For

Feature Feedback
Created Custom Class with initialize method & instance variables. Yes. Seems like you have an extraneous instance variable in your Planet class - @distance_from_sun =.
Used an Array to store a list of planets in the SolarSystem class. Yes. Nice job creating the add_planet method and print_planets methods in the SolarSystem.
Readable code with consistent indentation. Code formatting looks good. Eventually we'll want to clean up the comments throughout, but for now I think its good.
Created a pull request with your name & a meaningful message. Yep! For the first comprehension question, I'd say "instantiate" rather than "activate".

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