Skip to content

Conversation

@sarabrandao21
Copy link

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? we want to be able to give some initial data before adding methods to our class.
Why do you imagine we made our instance variables readable but not writable? because we are not reassigning the values.
How would your program be different if each planet was stored as a Hash instead of an instance of a class? I think would be harder to access the values using keys.
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? I would need to pay attention on my loop to get planets.
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? solar_system.rb has more responsibility I believe but planet.rb has just one to give the summary.
How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? require_relative 'planet'
require_relative 'solar_system' just on the main.rb file.

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