From d34fc373fd0a027368ad9617fba77ad70d46227a Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 13:43:22 -0800 Subject: [PATCH 01/14] Added Planet Class with a constructor --- planet.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 planet.rb diff --git a/planet.rb b/planet.rb new file mode 100644 index 00000000..e69de29b From 61af727b7c1d8e4d72d69d5e19e5219b24293cb3 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 14:02:52 -0800 Subject: [PATCH 02/14] Moved planet.rb to lib folder --- lib/planet.rb | 11 +++++++++++ planet.rb | 0 2 files changed, 11 insertions(+) create mode 100644 lib/planet.rb delete mode 100644 planet.rb diff --git a/lib/planet.rb b/lib/planet.rb new file mode 100644 index 00000000..a29edb2f --- /dev/null +++ b/lib/planet.rb @@ -0,0 +1,11 @@ +class Planet + attr_reader :name, :color, :mass_kg, :distance_from_sun_km, :fun_fact + + def initialize(name, color, mass_kg, distance_from_sun_km, fun_fact) + @name = name + @color = color + @mass_kg = mass_kg + @distance_from_sun_km = distance_from_sun_km + @fun_fact = fun_fact + end +end diff --git a/planet.rb b/planet.rb deleted file mode 100644 index e69de29b..00000000 From acef4720a8307bbb83fb30c2a5da76481d350dd2 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 14:03:53 -0800 Subject: [PATCH 03/14] Added main.rb --- lib/main.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/main.rb diff --git a/lib/main.rb b/lib/main.rb new file mode 100644 index 00000000..3a065418 --- /dev/null +++ b/lib/main.rb @@ -0,0 +1,6 @@ +require_relative "planet" + +def main +end + +main From 7357622916fe8f939c8c0ff64e91ca26ee695faf Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 14:29:35 -0800 Subject: [PATCH 04/14] Added main method & summary instance method --- lib/main.rb | 4 ++++ lib/planet.rb | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lib/main.rb b/lib/main.rb index 3a065418..06c23690 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -1,6 +1,10 @@ require_relative "planet" def main + waffles = Planet.new("Waffles", "maple syrup brown", 3.555e23, 1.273e10, 'Only known planet to be \ + smothered in fried chicken') + cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 1.5, 'This planet loves the sun so much \ + that it can\'t get close enough to it!') end main diff --git a/lib/planet.rb b/lib/planet.rb index a29edb2f..1e08e512 100644 --- a/lib/planet.rb +++ b/lib/planet.rb @@ -8,4 +8,9 @@ def initialize(name, color, mass_kg, distance_from_sun_km, fun_fact) @distance_from_sun_km = distance_from_sun_km @fun_fact = fun_fact end + + def summary + return "#{@name} is a #{@color} planet with a mass of #{@mass - kg} kg and is #{@distance_from_sun_km} \ + km from the sun! DID YOU KNOW?: #{@fun_fact}!!!" + end end From 90396bf06da035e9e3ab55274b5e7dee43afdd1b Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 14:40:05 -0800 Subject: [PATCH 05/14] Correcting Syntax and spelling --- lib/main.rb | 11 +++++++---- lib/planet.rb | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index 06c23690..ddda6e1a 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -1,10 +1,13 @@ require_relative "planet" def main - waffles = Planet.new("Waffles", "maple syrup brown", 3.555e23, 1.273e10, 'Only known planet to be \ - smothered in fried chicken') - cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 1.5, 'This planet loves the sun so much \ - that it can\'t get close enough to it!') + waffles = Planet.new("Waffles", "\'maple syrup\' brown", 3.555e23, 1.273e12, "It is the only known " \ + "planet to be smothered in fried chicken") + cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 0.000002, "This planet loves the sun so much " \ + "that it can\'t get close enough to it!") + + puts waffles.summary + puts cuddles.summary end main diff --git a/lib/planet.rb b/lib/planet.rb index 1e08e512..322cc030 100644 --- a/lib/planet.rb +++ b/lib/planet.rb @@ -10,7 +10,7 @@ def initialize(name, color, mass_kg, distance_from_sun_km, fun_fact) end def summary - return "#{@name} is a #{@color} planet with a mass of #{@mass - kg} kg and is #{@distance_from_sun_km} \ - km from the sun! DID YOU KNOW?: #{@fun_fact}!!!" + return "#{@name} is a #{@color} planet with a mass of #{@mass_kg} kg and is #{@distance_from_sun_km} " \ + "km from the sun! DID YOU KNOW: #{@fun_fact}?!?!" end end From ac4a02afa99b33cbbccd8e274cb9ac2816cd52a4 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 14:58:39 -0800 Subject: [PATCH 06/14] Added SolarSystem class --- lib/solar_system.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/solar_system.rb diff --git a/lib/solar_system.rb b/lib/solar_system.rb new file mode 100644 index 00000000..8b519abf --- /dev/null +++ b/lib/solar_system.rb @@ -0,0 +1,5 @@ +class SolarSystem + def initialize(star_name) + @star_name = star_name + end +end From 952101eb23de8f21e1322700f8234c849de195cf Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 15:05:58 -0800 Subject: [PATCH 07/14] Added add_planet method to SolarSystem class --- lib/solar_system.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/solar_system.rb b/lib/solar_system.rb index 8b519abf..872a29a5 100644 --- a/lib/solar_system.rb +++ b/lib/solar_system.rb @@ -1,5 +1,16 @@ +# class that is responsible for keeping track of a collection of instances of Planet class SolarSystem + # creating methods to read/return star_name & planets + attr_reader :star_name, :planets + + # creating a constructor that accepts and stores star_name in an instance variable + # and assigns an empty array to the instance variable planets def initialize(star_name) @star_name = star_name + @planets = [] + end + + def add_planet(planet) + @planets << planet end end From 13f5152199512f461169c988fc9fc34d3181c142 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 15:33:25 -0800 Subject: [PATCH 08/14] Added list_planets method to SolarSystem class --- lib/solar_system.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/solar_system.rb b/lib/solar_system.rb index 872a29a5..3d89f5e3 100644 --- a/lib/solar_system.rb +++ b/lib/solar_system.rb @@ -10,7 +10,20 @@ def initialize(star_name) @planets = [] end + # creating a method that adds a planet to the @planets array def add_planet(planet) @planets << planet end + + # creating a method that returns a list of all planets in a given solar system + def list_planets + planet_list = "Planets orbiting #{@star_name}: " + @planets.each_with_index { |planet, i| planet_list += "\n#{i + 1}. #{planet}" } + return planet_list + end end + +# milky_way = SolarSystem.new("Twinkles") +# milky_way.add_planet("Bear") +# milky_way.add_planet("Whiskey") +# puts milky_way.list_planets From d6c323b15e931acef64a8b42109b2222d3688736 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 15:44:28 -0800 Subject: [PATCH 09/14] Updated driver code --- lib/main.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index ddda6e1a..cca1a614 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -1,13 +1,16 @@ require_relative "planet" +require_relative "solar_system" def main + solar_system = SolarSystem.new("Big Ol Pupper") waffles = Planet.new("Waffles", "\'maple syrup\' brown", 3.555e23, 1.273e12, "It is the only known " \ "planet to be smothered in fried chicken") cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 0.000002, "This planet loves the sun so much " \ "that it can\'t get close enough to it!") - - puts waffles.summary - puts cuddles.summary + solar_system.add_planet("Waffles") + solar_system.add_planet("Cuddles") + list = solar_system.list_planets + puts list end main From d7a2beb399d47bcf91bc8c8d4e0e1c9a1da67bce Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Mon, 25 Feb 2019 16:55:11 -0800 Subject: [PATCH 10/14] Added method find_planet_by_name to SolarSystem class --- lib/main.rb | 12 ++++++++++-- lib/solar_system.rb | 16 ++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index cca1a614..5ef53814 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -7,10 +7,18 @@ def main "planet to be smothered in fried chicken") cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 0.000002, "This planet loves the sun so much " \ "that it can\'t get close enough to it!") - solar_system.add_planet("Waffles") - solar_system.add_planet("Cuddles") + solar_system.add_planet(waffles) + solar_system.add_planet(cuddles) list = solar_system.list_planets puts list + + found_planet = solar_system.find_planet_by_name("Cuddles") + # found_planet is an instance of class Planet + puts found_planet + # => # + puts found_planet.summary + # => Earth is a blue-green planet ... + end main diff --git a/lib/solar_system.rb b/lib/solar_system.rb index 3d89f5e3..a9024df6 100644 --- a/lib/solar_system.rb +++ b/lib/solar_system.rb @@ -17,13 +17,21 @@ def add_planet(planet) # creating a method that returns a list of all planets in a given solar system def list_planets - planet_list = "Planets orbiting #{@star_name}: " - @planets.each_with_index { |planet, i| planet_list += "\n#{i + 1}. #{planet}" } + planet_list = "Doggos orbiting #{@star_name}: " + @planets.each_with_index { |planet, i| planet_list += "\n#{i + 1}. #{planet.name}" } return planet_list end + + def find_planet_by_name(planet_string) + @planets.each do |planet| + if planet.name.include?(planet_string.capitalize) + return planet + end + end + end end # milky_way = SolarSystem.new("Twinkles") -# milky_way.add_planet("Bear") -# milky_way.add_planet("Whiskey") +# milky_way.add_planet("Waffles") +# milky_way.add_planet("Cuddles") # puts milky_way.list_planets From 3aaec260031de734ee20b9e1c7b2c9093e311739 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Tue, 26 Feb 2019 12:46:51 -0800 Subject: [PATCH 11/14] Added control loop --- lib/main.rb | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index 5ef53814..25566e38 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -2,22 +2,45 @@ require_relative "solar_system" def main - solar_system = SolarSystem.new("Big Ol Pupper") + big_ol_pupper = SolarSystem.new("Big Ol Pupper") waffles = Planet.new("Waffles", "\'maple syrup\' brown", 3.555e23, 1.273e12, "It is the only known " \ "planet to be smothered in fried chicken") - cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 0.000002, "This planet loves the sun so much " \ - "that it can\'t get close enough to it!") - solar_system.add_planet(waffles) - solar_system.add_planet(cuddles) - list = solar_system.list_planets - puts list - - found_planet = solar_system.find_planet_by_name("Cuddles") - # found_planet is an instance of class Planet - puts found_planet - # => # - puts found_planet.summary - # => Earth is a blue-green planet ... + cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 0.000002, "This planet loves the Big Ol " \ + "Pupper so much that it can\'t get close enough to it") + whiskey = Planet.new("Whiskey", "rich amber", 4.342e27, 3.473e13, "This planet has been aged for" \ + "billions of years in a giant cosmic cedar barrel") + bear = Planet.new("Bear", "jet black", 5.342e20, 5.342e14, "Contains more hugs per capita than any other" \ + "known planet") + pancake = Planet.new("Pancake", "light brown", 7.888e24, 3.342e5, "There is no planet fluffier or " \ + "flatter than Pancake") + + big_ol_pupper.add_planet(waffles) + big_ol_pupper.add_planet(cuddles) + big_ol_pupper.add_planet(whiskey) + big_ol_pupper.add_planet(bear) + big_ol_pupper.add_planet(pancake) + + answer = "list planets" + while answer == "list planets" + print "What would you like to do next? (list planets, or exit): " + selection = gets.chomp.downcase + + if selection == "list planets" + puts big_ol_pupper.list_planets + elsif selection == "exit" + break + end + end + + # list = solar_system.list_planets + # puts list + + # found_planet = solar_system.find_planet_by_name("Cuddles") + # # found_planet is an instance of class Planet + # puts found_planet + # # => # + # puts found_planet.summary + # # => Earth is a blue-green planet ... end From c9efcca76f50ea6dab2b2afda9b6b85f08bce86b Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Tue, 26 Feb 2019 12:59:00 -0800 Subject: [PATCH 12/14] Added planet details option --- lib/main.rb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index 25566e38..b655c8d5 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -22,20 +22,26 @@ def main answer = "list planets" while answer == "list planets" - print "What would you like to do next? (list planets, or exit): " + print "\nWhat would you like to do next? (list planets, planet details, or exit): " selection = gets.chomp.downcase - if selection == "list planets" + case selection + when "list planets" puts big_ol_pupper.list_planets - elsif selection == "exit" + when "planet details" + print "\nWhat planet would you like to see details for?: " + planet_details = gets.chomp.downcase + found_planet = big_ol_pupper.find_planet_by_name(planet_details) + puts found_planet.summary + when "exit" break end end - # list = solar_system.list_planets + # list = big_ol_pupper.list_planets # puts list - # found_planet = solar_system.find_planet_by_name("Cuddles") + # found_planet = big_ol_pupper.find_planet_by_name("Cuddles") # # found_planet is an instance of class Planet # puts found_planet # # => # From c3adf19ff6eab0ab101b349db3008c2e87c13eeb Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Tue, 26 Feb 2019 13:43:20 -0800 Subject: [PATCH 13/14] Added add planet option to control panel --- lib/main.rb | 42 ++++++++++++++++++++++++++---------------- lib/solar_system.rb | 2 +- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index b655c8d5..c356aa22 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -20,34 +20,44 @@ def main big_ol_pupper.add_planet(bear) big_ol_pupper.add_planet(pancake) - answer = "list planets" - while answer == "list planets" - print "\nWhat would you like to do next? (list planets, planet details, or exit): " + selection = "list planets" + # while selection != "exit" + while ["list planets", "planet details", "add planet", "exit"].include?(selection) + print "\nWhat would you like to do next? (list planets, planet details, add planet, or exit): " selection = gets.chomp.downcase + until ["list planets", "planet details", "add planet", "exit"].include?(selection) + print "Whoopsie Daisy! Please select an option from the list (list planets, planet details, add planet, or exit): " + selection = gets.chomp.downcase + end + case selection when "list planets" - puts big_ol_pupper.list_planets + puts "\n#{big_ol_pupper.list_planets}" when "planet details" print "\nWhat planet would you like to see details for?: " planet_details = gets.chomp.downcase found_planet = big_ol_pupper.find_planet_by_name(planet_details) - puts found_planet.summary + puts "\n====== #{found_planet.name} ======" + puts "#{found_planet.summary}" + when "add planet" + print "\nWhat is the name of the planet you would like to add?: " + new_planet = gets.chomp.capitalize + print "What is the color of the planet your are adding?: " + new_planet_color = gets.chomp.downcase + print "What is the mass of the planet you are adding (in kg)?: " + new_planet_mass = gets.chomp + print "What is the distance of this planet from Big Ol Pupper (in km)?: " + new_planet_distance = gets.chomp + print "What is a fun fact about this planet?: " + new_planet_fun_fact = gets.chomp.capitalize + new_planet_final = Planet.new(new_planet, new_planet_color, new_planet_mass, new_planet_distance, new_planet_fun_fact) + big_ol_pupper.add_planet(new_planet_final) + puts "\n========= New planet has been added to the Big Ol Pupper solar system! <3 ==========" when "exit" break end end - - # list = big_ol_pupper.list_planets - # puts list - - # found_planet = big_ol_pupper.find_planet_by_name("Cuddles") - # # found_planet is an instance of class Planet - # puts found_planet - # # => # - # puts found_planet.summary - # # => Earth is a blue-green planet ... - end main diff --git a/lib/solar_system.rb b/lib/solar_system.rb index a9024df6..d10c62bd 100644 --- a/lib/solar_system.rb +++ b/lib/solar_system.rb @@ -24,7 +24,7 @@ def list_planets def find_planet_by_name(planet_string) @planets.each do |planet| - if planet.name.include?(planet_string.capitalize) + if planet.name == planet_string.capitalize return planet end end From 3f21c259d9f900f7a6b39a784e0e64a477304f94 Mon Sep 17 00:00:00 2001 From: Kimberly-Fasbender Date: Wed, 27 Feb 2019 00:31:36 -0800 Subject: [PATCH 14/14] Add comments and clean up code --- lib/main.rb | 22 +++++++++------------- lib/planet.rb | 6 +++++- lib/solar_system.rb | 28 ++++++++++++++++++++-------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index c356aa22..7f7b91bd 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -1,8 +1,13 @@ require_relative "planet" require_relative "solar_system" +# method that creates an instance of a solar system and adds instances of planets to it +# also, creates a control panel for the user def main + # creating an instance of a solar system big_ol_pupper = SolarSystem.new("Big Ol Pupper") + + # creating instances of planets waffles = Planet.new("Waffles", "\'maple syrup\' brown", 3.555e23, 1.273e12, "It is the only known " \ "planet to be smothered in fried chicken") cuddles = Planet.new("Cuddles", "soft velvet grey", 9.973e30, 0.000002, "This planet loves the Big Ol " \ @@ -14,14 +19,15 @@ def main pancake = Planet.new("Pancake", "light brown", 7.888e24, 3.342e5, "There is no planet fluffier or " \ "flatter than Pancake") + # adding instances of planets to an array big_ol_pupper.add_planet(waffles) big_ol_pupper.add_planet(cuddles) big_ol_pupper.add_planet(whiskey) big_ol_pupper.add_planet(bear) big_ol_pupper.add_planet(pancake) + # control panel that allows users to list planets, look at planet detials, add planets, or exit program selection = "list planets" - # while selection != "exit" while ["list planets", "planet details", "add planet", "exit"].include?(selection) print "\nWhat would you like to do next? (list planets, planet details, add planet, or exit): " selection = gets.chomp.downcase @@ -41,18 +47,7 @@ def main puts "\n====== #{found_planet.name} ======" puts "#{found_planet.summary}" when "add planet" - print "\nWhat is the name of the planet you would like to add?: " - new_planet = gets.chomp.capitalize - print "What is the color of the planet your are adding?: " - new_planet_color = gets.chomp.downcase - print "What is the mass of the planet you are adding (in kg)?: " - new_planet_mass = gets.chomp - print "What is the distance of this planet from Big Ol Pupper (in km)?: " - new_planet_distance = gets.chomp - print "What is a fun fact about this planet?: " - new_planet_fun_fact = gets.chomp.capitalize - new_planet_final = Planet.new(new_planet, new_planet_color, new_planet_mass, new_planet_distance, new_planet_fun_fact) - big_ol_pupper.add_planet(new_planet_final) + big_ol_pupper.add_new_planet puts "\n========= New planet has been added to the Big Ol Pupper solar system! <3 ==========" when "exit" break @@ -60,4 +55,5 @@ def main end end +# runs main method main diff --git a/lib/planet.rb b/lib/planet.rb index 322cc030..5ea1a178 100644 --- a/lib/planet.rb +++ b/lib/planet.rb @@ -1,6 +1,9 @@ +# class that creates instances of planets class Planet - attr_reader :name, :color, :mass_kg, :distance_from_sun_km, :fun_fact + attr_accessor :name, :color, :mass_kg, :distance_from_sun_km, :fun_fact + # constructor that initializes a name, color, mass (kg), distance from the sun (km), and fun fact + # about each instance of a planet def initialize(name, color, mass_kg, distance_from_sun_km, fun_fact) @name = name @color = color @@ -9,6 +12,7 @@ def initialize(name, color, mass_kg, distance_from_sun_km, fun_fact) @fun_fact = fun_fact end + # method that prints out a summary of a planet instance def summary return "#{@name} is a #{@color} planet with a mass of #{@mass_kg} kg and is #{@distance_from_sun_km} " \ "km from the sun! DID YOU KNOW: #{@fun_fact}?!?!" diff --git a/lib/solar_system.rb b/lib/solar_system.rb index d10c62bd..7df46a63 100644 --- a/lib/solar_system.rb +++ b/lib/solar_system.rb @@ -3,25 +3,26 @@ class SolarSystem # creating methods to read/return star_name & planets attr_reader :star_name, :planets - # creating a constructor that accepts and stores star_name in an instance variable + # constructor that accepts and stores star_name in an instance variable # and assigns an empty array to the instance variable planets def initialize(star_name) @star_name = star_name @planets = [] end - # creating a method that adds a planet to the @planets array + # method that adds a planet to the @planets array def add_planet(planet) @planets << planet end - # creating a method that returns a list of all planets in a given solar system + # method that returns a list of all planets in a given solar system def list_planets planet_list = "Doggos orbiting #{@star_name}: " @planets.each_with_index { |planet, i| planet_list += "\n#{i + 1}. #{planet.name}" } return planet_list end + # method that returns the instance of a planet when given a string of its name def find_planet_by_name(planet_string) @planets.each do |planet| if planet.name == planet_string.capitalize @@ -29,9 +30,20 @@ def find_planet_by_name(planet_string) end end end -end -# milky_way = SolarSystem.new("Twinkles") -# milky_way.add_planet("Waffles") -# milky_way.add_planet("Cuddles") -# puts milky_way.list_planets + # method that adds a new planet to the existing solar system + def add_new_planet + print "\nWhat is the name of the planet you would like to add?: " + new_planet = gets.chomp.capitalize + print "What is the color of the planet your are adding?: " + new_planet_color = gets.chomp.downcase + print "What is the mass of the planet you are adding (in kg)?: " + new_planet_mass = gets.chomp + print "What is the distance of this planet from Big Ol Pupper (in km)?: " + new_planet_distance = gets.chomp + print "What is a fun fact about this planet?: " + new_planet_fun_fact = gets.chomp.capitalize + new_planet_final = Planet.new(new_planet, new_planet_color, new_planet_mass, new_planet_distance, new_planet_fun_fact) + add_planet(new_planet_final) + end +end