Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    A client of Person and Date which reveal the consequences.Lecture 5 - slide 23 : 29
Program 3
using System;

class Client{

  public static void Main(){

    Person p = new Person("Hanne", new Date(1926, 12, 24));
    Console.WriteLine("{0}", p);

    int age = p.DayAge();   
                            
    Console.WriteLine("{0} of age {1}", p, age);
  }

}
 
 
 
 
 
 
 
 
 
DayAge calls DayDifference which
mutates a copy of Hanne's birthday.