Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ChristmasWithTypes/Christmas.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System;
namespace ChristmasWithTypes
{
public class Christmas
public partial 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 { /*Fill out the days of the week*/ };

public enum Day { Sun, Mon, Tue, Wed, Thu, Fri, Sat };
}
}
8 changes: 8 additions & 0 deletions ChristmasWithTypes/Day.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace ChristmasWithTypes
{
public partial class Christmas
{


}
}
8 changes: 4 additions & 4 deletions ChristmasWithTypes/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ static void Main(string[] args)
{
var xmas = new Christmas();

var xmasDay = Christmas.Day.Thursday;
var xmasDay = Christmas.Day.Thu;

//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]{"xbox", "iphone", "tellytubby" };

//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");
Expand Down