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

&&: Monalisa's Solar System #33

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

Conversation

MonalisaC
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?
Whenever you call the method new on a class, as in SolarSystem.new, the class will create a new instance of itself. It will then, internally, call the method initialize on the new object. Doing so it will simply pass all the arguments that you passed to new on to the method initialize.
Describe an instance variable you used and what you used it for.
I used an instance variable year_length in Planet class and it provides the argument from the user the length of time the planet takes to go around its star in earth days
Describe what the difference would be if your SolarSystem used an Array vs a Hash.
I used an hash instead if I used an array then when accessing the array I would have to look for corresponding index number with hash [:key] method look up is easy.
Do you feel like you used consistent formatting throughout your code?
Yes

@tildeee
Copy link

tildeee commented Feb 14, 2018

Solar System

What We're Looking For

Feature Feedback
Baseline
Readable code with consistent indentation. 🌎
Primary Requirements
Created Custom Solar System Class with initialize, add planet & list planets methods, without using puts. 🌎
Planet Class Created 🌎
Created a collection of Planet objects as an instance variable in SolarSystem. 🌎
Accessor methods created 🌎
Method created to return the Planet's attributes and not use puts
Created a user interface to interact with the SolarSystem including adding a planet and viewing a planet's details 🌎
Additional Notes

Great job with this project!

The project does everything we expected and runs well!

You did a good job making two classes, SolarSystem and Planet. The two classes manage their own state and behavior.

The code is easily understandable and readable and it's clever. Good work!

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