public void Add(LibItem libItem) { if (libItem == null) { throw new System.ArgumentException("LibItem cannot be null."); } if (libItem.GetType() == typeof(Book)) { Books.Add((Book)libItem); } else if (libItem.GetType() == typeof(Article)) { Articles.Add((Article)libItem); } else if (libItem.GetType() == typeof(Movie)) { Movies.Add((Movie)libItem); } else if (libItem.GetType() == typeof(NewsPaper)) { NewsPapers.Add((NewsPaper)libItem); } else if (libItem.GetType() == typeof(Journal)) { Journals.Add((Journal)libItem); } else { throw new System.ArgumentException("Unknown type of library item"); } }
public void Return(LibItem libItem) { }
public void AddToCatalogue(LibItem libItem) { }
public void CheckOut(LibItem libItem) { }