Open
Conversation
Solar SystemWhat We're Looking For
|
Author
|
Awesome, thank you!!!
…On Thu, Aug 17, 2017 at 3:35 PM, Jamie Pilgrim ***@***.***> wrote:
Solar System What We're Looking For
Feature Feedback
Created Custom Class with initialize method & instance variables. Well
Done
Used an Array to store a list of planets in the SolarSystem class. Well
Done
Readable code with consistent indentation. Well Done
Created a pull request with your name & the template questions answered. Well
Done - initialize can also call other methods.
Submission meets project expectations.
*Additional Feedback*
Naming Conventions class names should be CamelCase, with each word
capitalized. instead of Solarsystem, it should be SolarSystem
helper method Instead of writing attr_reader for each attribute, you can
do it all on one line, by separating each attribute with a comma, like so attr_reader
:name, :mass, :diameter, :year_length, :distance_from_sun
list_planets method When needing a counter number and working with an
entire array, using the .each_with_index method on the array will iterate
through the array *and* give you the index number of the element.
distance_from_other_planets method Its doing something. As long as you
have two planet instances, you can call it like this: puts
p1.distance_from_other_planet(p2). I commented out the user interface
portion and ran this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AU_m1wlTU-XZbvcdAPnk0nSOdwc9cPKcks5sZMAzgaJpZM4O4jSy>
.
|
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 in your class?SolarSystemused anArrayvs aHash.