diff --git a/gradebook/src/GradeBook/Book.cs b/gradebook/src/GradeBook/Book.cs index ada3f20..8d70203 100644 --- a/gradebook/src/GradeBook/Book.cs +++ b/gradebook/src/GradeBook/Book.cs @@ -6,7 +6,22 @@ namespace GradeBook public class Book { private List grades; - public string Name; + + private string name; + public string Name + { + get + { + return name; + } + set + { + if (!String.IsNullOrEmpty(value)) + { + name = value; + } + } + } public Book(string name) { @@ -25,7 +40,7 @@ namespace GradeBook } } - public void AddLetterGrade(char letter) + public void AddGrade(char letter) { switch (letter) { diff --git a/gradebook/src/GradeBook/Program.cs b/gradebook/src/GradeBook/Program.cs index 9d61e82..45ab748 100644 --- a/gradebook/src/GradeBook/Program.cs +++ b/gradebook/src/GradeBook/Program.cs @@ -30,6 +30,7 @@ namespace GradeBook { Console.WriteLine($"Received: {input}"); book.AddGrade(Convert.ToDouble(input)); + // book.AddGrade('A'); } catch (ArgumentException ex) {