using System; public class stu13main { public static void Main() { student d = new grad("olim","lambdacalc",new nostudent()); student c = new undergrad("john",0.8,d); student b = new grad("chris","oop",c); student a = new undergrad("george",4.0,b); double v = (double)a.accept(new gpaaverager()); Console.WriteLine("overall average gpa="+v); auditor a1 = new auditor(a); a1.run(); // a1 is a stateful visitor student w = new weirdstudent("ted",10000,a); student x = new weirdstudent("fred",25000,w); (new wauditor(x)).run(); v = (double)x.accept(new gpaaverager()); //compiler or runtime error? } } /* Compile into stu13main.exe with csc stu13main.cs /r:stu13.dll /r:stu13b.dll */