Skip to content

Solar-System#49

Open
Blaine206 wants to merge 2 commits intoAda-C14:masterfrom
Blaine206:master
Open

Solar-System#49
Blaine206 wants to merge 2 commits intoAda-C14:masterfrom
Blaine206:master

Conversation

@Blaine206
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? Immediately and it assigns default variables to instance variables.
Why do you imagine we made our instance variables readable but not writable? Make them readable and not writable so others can't change the variables purposely or inadvertently.
How would your program be different if each planet was stored as a Hash instead of an instance of a class?
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of 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? Planets class only deals with planets, SolarSystem class only works with creating the solar system, and main engages both to create planets in the solar system and gives you the CLI.
How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? Planet had no require, SolarSystem had planet required, and main required both the planet and solar system class.

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