Skip to content

Conversation

@mulhoo
Copy link

@mulhoo mulhoo commented Feb 20, 2020

Assignment Submission: Solar System

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Question Answer
When does the initialize method run? What does it do? At the very beginning, it helps set the stuff for the class.
Why do you imagine we made our instance variables readable but not writable? So then they can't be changed, but can still be accessed outside of the class.
How would your program be different if each planet was stored as a Hash instead of an instance of a class? I would use a lot more methods in order to go into each hash, like we did in the ride share. It would be a lot of nested arrays/hashes.
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? I'm unsure, except that I would be using different methods later on to access them.
There is a software design principle called the SRP. The Single Responsibility Principle (SRP) says that each class should be responsible for exactly one thing. Do your classes follow SRP? What responsibilities do they have? Yes. My planet class is responsible for all the planet things, my solar system class is responsible for managing those planets.
How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? they're at the top, they make sure that my classes for Planet and Solar System have their own page and can be used in main.rb

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