Skip to content

Time - Denisse#37

Open
denisseai wants to merge 5 commits intoAda-C13:masterfrom
denisseai:master
Open

Time - Denisse#37
denisseai wants to merge 5 commits intoAda-C13:masterfrom
denisseai:master

Conversation

@denisseai
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? The initialize method is part of the object-creation process in Ruby and it allows you to set the initial values for an object.
Why do you imagine we made our instance variables readable but not writable? Because we don't want the user to modify them.
How would your program be different if each planet was stored as a Hash instead of an instance of a class? It would be more enumerable methods to be able to access the specific properties of each planet. In addition, populating the class might be less readable.
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? Adding planets would be done differently. The rest of the information could either go in as a value array or nested hashes. The structure would have to be more complicated.
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? Only the planet class follows the SRP
How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? I recognized if they needed to be accessed or if it already had access through another file that contained 'require'.

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