From 793234e93504d1906abfdccacd5a3c1d5416b093 Mon Sep 17 00:00:00 2001 From: Adam Nash Date: Wed, 9 Jun 2021 12:53:09 -0600 Subject: [PATCH 1/2] Added missing fields --- ChristmasWithTypes/Christmas.cs | 2 +- ChristmasWithTypes/Program.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChristmasWithTypes/Christmas.cs b/ChristmasWithTypes/Christmas.cs index e22b5c0..f2a8a0e 100644 --- a/ChristmasWithTypes/Christmas.cs +++ b/ChristmasWithTypes/Christmas.cs @@ -8,7 +8,7 @@ public class Christmas public int TreeHeight { get; set; } //TODO Make the Height property nullable //TODO Make the property, "Day", type enum - public enum Day { /*Fill out the days of the week*/ }; + public enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }; } } diff --git a/ChristmasWithTypes/Program.cs b/ChristmasWithTypes/Program.cs index 9c17ce9..5525d64 100644 --- a/ChristmasWithTypes/Program.cs +++ b/ChristmasWithTypes/Program.cs @@ -11,13 +11,13 @@ static void Main(string[] args) var xmasDay = Christmas.Day.Thursday; //TODO set Santa's name to Kris Kringle - xmas.Santa = null; + xmas.Santa = "Kris Kringle"; //TODO Insert 3 presents you would like for xmas. They must be strings - xmas.Presents = new string[3]{ }; + xmas.Presents = new string[3]{"New Laptop", "Diamond DA40", "Siberian Husky Puppy" }; //TODO Set the TreeHeight to 10 - xmas.TreeHeight = null; + xmas.TreeHeight = 10; Console.WriteLine($"This year christmas falls on {xmasDay} \n"); Console.WriteLine($"Our tree will be {xmas.TreeHeight} feet high \n"); From 8fc1f49b220451c426b2b92bcf5549e7e3f37889 Mon Sep 17 00:00:00 2001 From: Adam Nash Date: Wed, 9 Jun 2021 13:32:31 -0600 Subject: [PATCH 2/2] Nullable field added for Christmas --- ChristmasWithTypes/Christmas.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChristmasWithTypes/Christmas.cs b/ChristmasWithTypes/Christmas.cs index f2a8a0e..aad79c7 100644 --- a/ChristmasWithTypes/Christmas.cs +++ b/ChristmasWithTypes/Christmas.cs @@ -5,7 +5,7 @@ public class Christmas { public string[] Presents; public string Santa { get; set; } - public int TreeHeight { get; set; } //TODO Make the Height property nullable + public int? TreeHeight { get; set; } //TODO Make the Height property nullable //TODO Make the property, "Day", type enum public enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday };