Skip to content

Conversation

@marisamorris
Copy link

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What was the purpose of the initialize method in your class? To define and automatically call new methods when creating instance variables using .new.
Describe an instance variable you used and what you used it for. @planets is an instance variable. I used it when adding a new planet to the solar system.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. if my solar system utilized a hash, I would have needed to pass two variables through the initialize method instead of one to access the key-value pair
Do you feel like you used consistent indentation throughout your code? Yes

@CheezItMan
Copy link

Solar System

What We're Looking For

Feature Feedback
Created Custom Class with initialize method & instance variables. Check, you can later create method like print_planets to return a string instead of printing directly, and name them to_s. That way you can do things like put sol assuming sol is a SolarSystem object.
Used an Array to store a list of planets in the SolarSystem class. Check
Readable code with consistent indentation. Check
Created a pull request with your name & the template questions answered. Check
Summary For your comprehension questions, I'm not sure you would have needed 2 parameter, if you used a hash. You would intead have needed to adjust your loops to use keys and values instead of just index numbers however. Overall however very nicely done. You hit all the requirements!

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