Skip to content

Leaves - Katie#45

Open
KKennedyCodes wants to merge 5 commits intoAda-C12:masterfrom
KKennedyCodes:master
Open

Leaves - Katie#45
KKennedyCodes wants to merge 5 commits intoAda-C12:masterfrom
KKennedyCodes:master

Conversation

@KKennedyCodes
Copy link

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
When does the initialize method run? What does it do? The initialize method makes the data accessible to the methods in the class.
Why do you imagine we made our instance variables readable but not writable? We do not want the user to be able to change the values or information.
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 difficult to access the information. I would have to iterate through the information to find what I need. By making each planet an instance of a class, I can easily call upon that instance to find specific information about that planet.
How would your program be different if your SolarSystem class used a Hash instead of an Array to store the list of planets? If I would have used a Hash to store planet information, I would have to use a key to find planet info. It would add another step to getting the information needed.
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? Yes my program follows the SRP method. The planets class assigns planet information and the solar system class adds the planets to the system.
How did you organize your require statements? Which files needed `requires, and which did not? What is the pattern? My main.rb file was the only file that needed require statements. The main needed the statements in order to access the classes and methods in the associated files.

@beccaelenzil
Copy link

Solar System

What We're Looking For

Feature Feedback
Baseline
Whitespace (indentation, vertical space, etc) check
Variable names check
Git hygiene check
Planet
initialize method stores parameters as instance variables with appropriate reader methods check
summary method returns a string check
SolarSystem
initialize creates an empty list of planets check
add_planet takes an instance of Planet and adds it to the list check
list_planets returns a string check
find_planet_by_name returns the correct instance of Planet this method should be case insensitive. For instance, we should be able to find 'eaRth'.
CLI
Can list planets and quit check
Can show planet details check
Can add a planet This feature has not been implemented
Complex functionality is broken out into separate methods You could consider using helper methods, though the case/when statement works well.
Overall Good job overall - this submission is well-organized and your logic is clear. You did not complete the implementation of a couple features: (1) add planet in the CLI and (2) making find_planet_by_name case insensitive. Make sure you know how you would implement these features, and if you have time, go ahead and add them.

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