public void AddMerchandise(Merchandise merchandise) { if (merchandise is Amulet) { { Amulet amulet = (Amulet)merchandise; merchandises.Add(Amulet) merchandise); } } else if (merchandise.add()) }
public static double GetValueOfMerchandise(Merchandise merch) { if (merch is Book book) { return(GetValueOfBook(book)); } else if (merch is Amulet amulet) { return(GetValueOfAmulet(amulet)); } return(0); }
public void AddMerchandise(Merchandise merchandise) { merchandises.Add(merchandise); //if (merchandise is Amulet) //{ // merchandises.Add(merchandise); //} //else if (merchandise is Book) //{ // merchandises.Add(merchandise); //} }
public void AddBook(Merchandise merchandise) { merchandises.Add(merchandise); }
public void AddAmulet(Merchandise merchandise) { merchandises.Add(merchandise); }
public void AddMerchandise(Merchandise merch) { merchandises.Add(merch); }
public void AddMerchandise(Merchandise merchandise) { Merchandises.Add(merchandise); }