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

Luxi Lindsey - Solar-System - Octos #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Lindseyls
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? - It's to help us define the parameters for the planets and to pass arguments to the methods.
Describe an instance variable you used and what you used it for. - The instance variable @planet was used to easily read and write either one or multiple planets into the methods in the SolarSystem class.
Describe what the difference would be if your SolarSystem used an Array vs a Hash. - For the hash to find the name of each listed planet in my_planet hash, I had to create a separate name method in the Planet class so that it can output the list of names from the my_planet hash inside the SolarSystem class. Whereas to read the array, all I had to do was call the instance variable name with planet.name
Do you feel like you used consistent formatting throughout your code? - Yes, but it was very difficult as the codes were very long and spread out.

@Lindseyls
Copy link
Author

This was a very difficult assignment for me. I wished that the instructions were a little bit more clear or that we went through each Wave and it's instructions during class to avoid confusion. Also, I need to continue to work on methods and class and learning how to use the instance variables in methods.

@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 x
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

Good job with this project!

Your code has what we expected and runs as expected and looks good

One thing we wish would've been in this project was accessing SolarSystem's planets.
Specifically, you have an array of planets in my_planets. You have an instance of SolarSystem in my_solar_system, that has an instance variable @planets which has the value of my_planets.
When you add a new planet to a list of planets, you correctly call my_solar_system.add( new_planet ). However, when you access a planet from a planet list like you do on line 166, we would prefer if you call my_solar_system.planets instead of my_planets.

Also, there's one small bug with your program: if I run the program and then type "0" (or any invalid input), it will display the info for Earth. That's because the value of user_input at that time will be 0, so on line 166 my_planets[user_input - 1].attributes will mean my_planets[-1], which is the last element of my_planets, which is Earth!

Otherwise, everything looks good and accomplishes the learning goals :) Good work overall

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