public static void Deposite(ICreditCard creditCard, decimal amountToDeposite)
 {
     creditCard.DepositeCash(amountToDeposite);
     Console.WriteLine($"Dear: {creditCard.GetHolderInfo().Name}");
     Console.WriteLine($"Your brand is : {creditCard.GetBrand()}");
     Console.WriteLine($"You have deposited {amountToDeposite} and now you have {creditCard.GetMoney()}$ with {creditCard.GetInterest()}$ of interest per year");
 }
예제 #2
0
        private static void ShopWithCreditCard(ICreditCard creditCard, decimal amount)
        {
            Console.WriteLine($"Brand {creditCard.GetBrand()}");
            var holderInformation = creditCard.GetHolderInformation();

            Console.WriteLine($"information:{holderInformation.Name} {holderInformation.Address}");
            var interest = creditCard.CalculateInterest(amount);

            Console.WriteLine($"the interes will be: {interest}$ if you spend {amount}$");
        }