public void testMultiplication() { Dollar five = new Dollar(5); five.times(2); Assert.AreEqual(10, five.amount); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Dollar d = new Dollar() { money = 5 }; Ruble r = new Ruble() { money = 5 }; Console.WriteLine(d > r); Console.WriteLine((d + r).money); Console.WriteLine((d - r).money); }
public override bool Equals(object obj) { Dollar dollar = obj as Dollar; return(dollar.Amount == Amount); }