//Dollar times(int multiplier)
        //{
        //    amount *= multiplier;
        //    return new Dollar;
        //}

        public bool equals(Dollar dollar)
        {
            Dollar dollar1 = (Dollar)dollar;

            return(amount == dollar1.amount);
            //return true;
        }
Beispiel #2
0
        public void testMultiplication()
        {
            Dollar five = new Dollar(5);

            Assert.AreEqual(10, five.times(2));
            //Assert.AreEqual(new Dollar(10), five.times(2));
            //Assert.AreEqual(new Dollar(15), five.times(3));
        }