diff --git a/gradebook/src/GradeBook/Book.cs b/gradebook/src/GradeBook/Book.cs index d45358e..e2f704b 100644 --- a/gradebook/src/GradeBook/Book.cs +++ b/gradebook/src/GradeBook/Book.cs @@ -5,20 +5,28 @@ namespace GradeBook { public delegate void GradeAddedDelegate(object sender, EventArgs args); - public class Book + public class NamedObject + { + + public NamedObject(string name) + { + Name = name; + } + public string Name + { + get; + set; + } + } + public class Book : NamedObject { private List grades; readonly string category; private string name; - public string Name - { - get; - set; - } - public Book(string name) + public Book(string name) : base(name) { Name = name; grades = new List(); diff --git a/gradebook/src/GradeBook/Program.cs b/gradebook/src/GradeBook/Program.cs index 54de553..2134bdd 100644 --- a/gradebook/src/GradeBook/Program.cs +++ b/gradebook/src/GradeBook/Program.cs @@ -8,16 +8,8 @@ namespace GradeBook static void Main(string[] args) { - // var book = new Book("Scott's Grade Book"); - // book.AddGrade(89.1); - // book.AddGrade(90.5); - // book.AddGrade(87.2); - var book = new Book("Jason's Grade Book"); book.GradeAdded += OnGradeAdded; - book.GradeAdded += OnGradeAdded; - book.GradeAdded -= OnGradeAdded; - book.GradeAdded -= OnGradeAdded; string input;