public CreditCard GetCard(CardDetails cardDetails) { cardDetails.CardType = chain.Handle(cardDetails.CardNumber); Console.WriteLine("Card Type is " + cardDetails.CardType.ToString()); CardFactory factory = new CardGenerator(); return(factory.GetCreditCard(cardDetails)); }