Skip to content

Conversation

@jackiewatanabe
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? it gives each instance of the class initial values and data
Describe an instance variable you used and what you used it for. I used the instance variable @planets_list to create an array to hold information for each planet. I used the instance variable later on to create a method to print out planet info for each planet in that array
Describe what the difference would be if your SolarSystem used an Array vs a Hash. If an array was used, I could have to loop through each array or know the index number of information versus being able to call specific information.
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.
Used an Array to store a list of planets in the SolarSystem class.
Readable code with consistent indentation.
Created a pull request with your name & a meaningful message.

Summary

I noticed that your method to output the distance from the sun doesn't work quite right, you don't pass into the hash the distance from the sun so you get:

Hoth has 2 moon(s) and 1 ring(s) and has a diameter of 30000000.0 miles and has an oribital period of 1.2 days and is ft from the sun

Notice ft from the sun. So you should check your initialize method.

Also notice that your print_system_info reuses the same loop you wrote in list_planets... Hmmm... this looks like it could be DRYer. You should instead call list_planets from the print_system_info method.

Overall it's well done however. Nice work.

One Note

This is irrelevant to the project so feel free to ignore, but the Milky Way is a Galaxy not a solar system.

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