Ejemplo n.º 1
0
 internal override ApplePrice CreateApplePriceFactory(string type)
 {
     ApplePrice ap = null;
     switch (type)
     {
         case "IpadMini":
             ap = new IpadMiniPrice();
             break;
         case "IpadAir":
             ap = new IpadAirPrice();
             break;
         default:
             break;
     }
     if (ap == null)
         throw new Exception();
     return ap;
 }
Ejemplo n.º 2
0
        internal override ApplePrice CreateApplePriceFactory(string type)
        {
            ApplePrice ap = null;

            switch (type)
            {
            case "IpadMini":
                ap = new IpadMiniPrice();
                break;

            case "IpadAir":
                ap = new IpadAirPrice();
                break;

            default:
                break;
            }
            if (ap == null)
            {
                throw new Exception();
            }
            return(ap);
        }