Skip to content

done#47

Open
crypt0kitty wants to merge 15 commits intoAda-C14:masterfrom
crypt0kitty:master
Open

done#47
crypt0kitty wants to merge 15 commits intoAda-C14:masterfrom
crypt0kitty:master

Conversation

@crypt0kitty
Copy link
Copy Markdown

@crypt0kitty crypt0kitty commented Sep 25, 2020

Assignment Submission: Solar System

Reflection

| When does the initialize method run? What does it do? | This special method creates the @star_name and @alien_types objects.

| Why do you imagine we made our instance variables readable but not writable? | Probably because we don’t want those attributes to change.

| How would your program be different if each planet was stored as a Hash instead of an instance of a class? | I don’t know.

| How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? | The push/shovel method would not work to to place the aliens inside the hash. I would need to create a hash and set the symbols/keys equal to the instance variable holding alien_types.

| 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 believe they do, the Alien_Type class deals more with creating the instance variables, or state and SolarSystem also has state but with more behavior.

| How did you organize your require statements? Which files needed requires, and which did not? What is the pattern? | Main.rb is the only file that needs ‘requires’. It appears like main is the central location that calls methods from all classes.

@crypt0kitty crypt0kitty force-pushed the master branch 6 times, most recently from 718dcf1 to b3a8804 Compare February 22, 2022 07:15
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