Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

turning in solar system #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Lasiorhine
Copy link

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What was the purpose of the initialize method in your class?

To make sure that all instances of the class were imbued with the specified instance variables as soon as they were created.

| Describe an instance variable you used and what you used it for. |

The @year instance variable held the year that a book describing a given planet was published.

| Describe what the difference would be if your SolarSystem used an Array vs a Hash. |

(Does this refer to Wave 1? Because the finished Wave 3 version has classes and arrays but no hashes.) In Wave 2, having a hash allowed us to save specific details about each planet under a system of keys. But we were able to do substantially the same thing using class variables in the final, Wave 3 version.)

| Do you feel like you used consistent formatting throughout your code? |

I certainly tried to do that.

@tildeee
Copy link

tildeee commented Feb 14, 2018

Solar System

What We're Looking For

Feature Feedback
Baseline
Readable code with consistent indentation. x
Primary Requirements
Created Custom Solar System Class with initialize, add planet & list planets methods, without using puts. x
Planet Class Created yes, as SfWorld
Created a collection of Planet objects as an instance variable in SolarSystem. x
Accessor methods created x
Method created to return the Planet's attributes and not use puts x
Created a user interface to interact with the SolarSystem including adding a planet and viewing a planet's details x
Additional Notes

Great job!

The code looks pretty good and the project functions as we expected :)

The project uses two classes (SfWorld and SolarSystem) and you used them well and made instances of them. With these instances, you defined behaviors and state on them-- great job!

Lastly, the theme of this project was so good :)


class SfWorld
attr_accessor :name, :author, :first_book, :year, :lifeforms
def initialize (name, author, first_book, year, lifeforms)
Copy link

Choose a reason for hiding this comment

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

This is just a small comment--

when I open this code in Atom on my computer, Atom puts a little squiggly underline underneath this line giving me a warning. (It doesn't affect my code running or anything, just gives me a warning). If you see that squiggly underline on your computer too and it bothers you, it's simply because Atom thinks there shouldn't be a space between def initialize and the ( parenthesis character, and it wants it to look like:

def initialize(name, author, first_book, year, lifeforms)

instead of

def initialize (name, author, first_book, year, lifeforms)

like i said, not a big deal though :P

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