예제 #1
0
        public void AddMerchandise(Merchandise merchandise)
        {
            if (merchandise is Amulet)
            {
                {
                    Amulet amulet = (Amulet)merchandise;
                    merchandises.Add(Amulet) merchandise);
                }
            }
            else if (merchandise.add())


    }
예제 #2
0
        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);
        }
예제 #3
0
        public void AddMerchandise(Merchandise merchandise)
        {
            merchandises.Add(merchandise);
            //if (merchandise is Amulet)
            //{
            //    merchandises.Add(merchandise);

            //}
            //else if (merchandise is Book)
            //{
            //    merchandises.Add(merchandise);
            //}
        }
예제 #4
0
 public void AddBook(Merchandise merchandise)
 {
     merchandises.Add(merchandise);
 }
예제 #5
0
 public void AddAmulet(Merchandise merchandise)
 {
     merchandises.Add(merchandise);
 }
예제 #6
0
 public void AddMerchandise(Merchandise merch)
 {
     merchandises.Add(merch);
 }
예제 #7
0
 public void AddMerchandise(Merchandise merchandise)
 {
     Merchandises.Add(merchandise);
 }