Skip to content

Conversation

@qqdipps
Copy link

@qqdipps qqdipps commented Feb 27, 2019

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
When does the initialize method run? What does it do? When a new instance is created, initialize method auto runs the code block, usually sets instance variables from variable args.
Why do you imagine we made our instance variables readable but not writable? We wanted to access, but not replace or update states of our object directly.
How would your program be different if each planet was stored as a Hash instead of an instance of a class? Would not be able to store behaviors, also creating collection of planets would be more difficult. Creating new instances of planet is more straight forward than duping and overwriting data in hash or creating new hash from template or scratch.
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? It would be a hot mess. Can't store all those methods/ behaviors in hash.
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? SRP of planet is storing template of planet. SRP of solar system is store a template for a collection of planets along with subsequent states and behaviors.
How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? I put require and require_relative statements at the top of the files. Main required both planet and solar system, also for colorize gem. Solar system did not require planet file path because planet class was not directly referenced instead planet instances were passed as args in main. Spec files required corresponding code files and gems.

@CheezItMan
Copy link

Solar System

What We're Looking For

Feature Feedback
Overall Nice work, very neat animations and use of colorize. You also wrote some nice tests to go along with the SolarSystem and Planet classes. You hit all the learning goals for the project and then some.

@@ -0,0 +1,57 @@
gem "minitest", ">= 5.0.0"
require "minitest/pride"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fabulous use of minitest-pride!

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.

2 participants