Beispiel #1
0
 static void Main(string[] args)
 {
     try
     {
         MobileShop shop = new MobileShop();
         Console.Write("Enter mobile brand you are looking for : ");
         string         userChoiceOfBrand = Console.ReadLine();
         IMobileFactory mobileFactory     = shop.BuyMobile(userChoiceOfBrand);
         PrintDetails(mobileFactory);
     }catch (NoSuchMobileExcpetion ex)
     {
         Console.WriteLine(ex.Message);
     }
     Console.ReadLine();
 }
 public ShopKeepar()
 {
     Iphone     = new iphone();
     Samsung    = new Samsung();
     BlackBerry = new BlackBerry();
 }