Skip to content

Time - Sharon Cheung #40

Open
sharonkeikei wants to merge 8 commits intoAda-C13:masterfrom
sharonkeikei:master
Open

Time - Sharon Cheung #40
sharonkeikei wants to merge 8 commits intoAda-C13:masterfrom
sharonkeikei:master

Conversation

@sharonkeikei
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? It is called automatically from within the new method, we use it to "construct" our object.
Why do you imagine we made our instance variables readable but not writable? So that the users won't be able to "mess" with our data.
How would your program be different if each planet was stored as a Hash instead of an instance of a class? It wouldn't be as easy to access the behavior and states like class.
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? Array should be easier to find data.
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? I think so, since Planet class is storing all the planet data and Solar System class is having its behaviors.
How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? I will list out all the require_relative files on top of the code.

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