Skip to content

Solar System - Angela - Octos #20

Open
knockknockhusthere wants to merge 1 commit into
Ada-C9:masterfrom
knockknockhusthere:master
Open

Solar System - Angela - Octos #20
knockknockhusthere wants to merge 1 commit into
Ada-C9:masterfrom
knockknockhusthere:master

Conversation

@knockknockhusthere
Copy link
Copy Markdown

Solar System

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What was the purpose of the initialize method in your class? It sets the default values for any newly created instances of this class.
Describe an instance variable you used and what you used it for. @planet_list was my only instance variable in the solar system class. This was the array of planets, and I made it an instance variable so that I could access it from other methods within the class.or example, storing a new planet into that array, or looping through the array.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. The individual planet hashes might not stay in order if they are stored in a hash.
Do you feel like you used consistent formatting throughout your code? Yes

@knockknockhusthere knockknockhusthere changed the title Solar System =Angela - Octos Solar System - Angela - Octos Feb 12, 2018
@droberts-sea
Copy link
Copy Markdown

Solar System

What We're Looking For

Feature Feedback
Baseline
Readable code with consistent indentation. yes
Primary Requirements
Created Custom Solar System Class with initialize, add planet & list planets methods, without using puts. yes
Planet Class Created yes
Created a collection of Planet objects as an instance variable in SolarSystem. yes
Accessor methods created yes
Method created to return the Planet's attributes and not use puts yes
Created a user interface to interact with the SolarSystem including adding a planet and viewing a planet's details yes
Additional Notes Great job overall! This code is well-organized and easy to read, and it seems like you've got a strong grasp on working with classes. Keep up the hard work!

Comment thread solar_system.rb

def create_planet
puts "Enter the name of the planet you would like to create: "
name = gets.chomp.downcase.capitalize
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I like that you've broken this out as a separate method - good organization!

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