Open
Conversation
Solar SystemWhat We're Looking For
Your planet and solar system code is really clean. I agree with you that the main code is a little hard to follow, but I'm sure that would've been fixed with more time. This assignment had a real quick turnaround. And also it works well and does everything! Good job! |
jmaddox19
reviewed
Aug 26, 2019
| end | ||
| eval = nil | ||
| when "planet details" | ||
| puts solar_system_1.planet_details |
There was a problem hiding this comment.
This is really stirring my curiosity. planet_details is not a method defined on the solar_system class so I'm not sure how this is working.
| def planet_details | ||
| print "Enter the name of the planet you want to search for: " | ||
| planet_search_term = gets.chomp.upcase | ||
| return_statement = find_planet_by_name(planet_search_term) |
There was a problem hiding this comment.
This is really stirring my curiosity. find_planet_by_name is a method defined on the solar_system class so I'm not sure how this is working without calling it on an instance of solar_system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solar System
Congratulations! You're submitting your assignment.
Comprehension Questions
initializemethod run? What does it do?Hashinstead of an instance of a class?SolarSystemclass used aHashinstead of anArrayto store the list of planets?Planet is in charge of the individual planet’s class. It does not communicate with the user directly.
However, I find the main.rb file is very cluttered and within it the methods are not single-purpose as I would like, rather sweeping across the problem in a clumsy fashion.
| How did you organize your
requirestatements? Which files neededrequires, and which did not? What is the pattern? | All the require statements are listed in the Main file, which required planet.rb and solar_system.rb