Skip to content

Create solarsystem.rb#1

Open
brittanyrjones wants to merge 1 commit intomasterfrom
brittanyrjones-patch-1
Open

Create solarsystem.rb#1
brittanyrjones wants to merge 1 commit intomasterfrom
brittanyrjones-patch-1

Conversation

@brittanyrjones
Copy link
Owner

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What was the purpose of the initialize method in your class? I used the initialize method on the class planets because I wanted each planet to know their attributes, so that each planet has the same arguments, or attributes like year length etc.
Describe an instance variable you used and what you used it for. I used an instance variable @planet to assign the local variable planet to it, to create the local variable of the same name. I wanted these variables to be accessible throughout the entire objects scope.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. If I used array instead of hash, it would be easier because I would not have to put in each argument. It would have been easier because the has is a collection of data, were a hash is more of a numbered list which can be accessed with index instead of keys.
Do you feel like you used consistent formatting throughout your code?
I used consistent coding throughout most of my code. Towards the end of my code when I tried to get user input, my formatting fell short.

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.

1 participant