Example #1
0
        public void TestPersonInterest()
        {
            CreditCardInterestRate.CreditCards[] cards  = { discover, visa, masterCard };
            CreditCardInterestRate.Wallet        wallet = new CreditCardInterestRate.Wallet(cards);
            CreditCardInterestRate.Wallet[]      walArr = { wallet };

            CreditCardInterestRate.Persons person = new CreditCardInterestRate.Persons(walArr);

            Assert.AreEqual(16.0, person.getPersonInterest());
        }
Example #2
0
        public void TestPersonInterest()
        {
            CreditCardInterestRate.CreditCards[] cardArr1 = { discover, visa };
            CreditCardInterestRate.CreditCards[] cardArr2 = { masterCard };

            CreditCardInterestRate.Wallet   wallet1 = new CreditCardInterestRate.Wallet(cardArr1);
            CreditCardInterestRate.Wallet   wallet2 = new CreditCardInterestRate.Wallet(cardArr2);
            CreditCardInterestRate.Wallet[] walArr  = { wallet1, wallet2 };

            CreditCardInterestRate.Persons person = new CreditCardInterestRate.Persons(walArr);

            Assert.AreEqual(16, person.getPersonInterest());
        }
Example #3
0
        static void Main(string[] args)
        {
            DiscoverCard discover   = new DiscoverCard(100);
            Visa         visa       = new Visa(100);
            MasterCard   masterCard = new MasterCard(100);

            CreditCards[] cardArr = { visa, masterCard };
            Wallet        wallet  = new Wallet(cardArr);

            Wallet[] walArr = { wallet };
            Persons  person = new Persons(walArr);

            Console.WriteLine("Person Interest:" + person.getPersonInterest());
            Console.WriteLine("Wallet Interest:" + wallet.getWalletInterest());

            Console.ReadLine();
        }