Yurttas/PL/OOL/CS/F/04/03/00/ABCD00.cs

 1/**
 2 *  Copyright(C) 2004
 3 *  All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4 *
 5 *  Permission to use, copy, modify, and distribute this
 6 *  software and its documentation for EDUCATIONAL purposes
 7 *  and without fee is hereby granted provided that this
 8 *  copyright notice appears in all copies.
 9 *
10 *  @date   : January 1, 2004.
11 *  @authorĀ : Salih Yurttas.
12 */
13
14
15public class ABCD00
16{
17  public static void Main(string[] args)
18  {
19    IA a0 = new D();
20
21    System.Console.WriteLine("a0 after instantiated -");
22    a0.PrintAll();
23
24    a0.SetI1(3);
25
26    System.Console.WriteLine("a0 after SetI1 -");
27    a0.PrintAll();
28
29    System.Console.WriteLine("a0 after GetI1 - {0}",
30                             a0.GetI1());
31
32    System.Console.WriteLine();
33
34    IB b0 = new D();
35
36    System.Console.WriteLine("b0 after instantiated -");
37    b0.PrintAll();
38
39    b0.SetI1(2);
40    b0.SetI2(7);
41
42    System.Console.WriteLine("b0 after SetI1 and I2 -");
43    b0.PrintAll();
44
45    System.Console.WriteLine("b0 after GetI1 - {0}",
46                             b0.GetI1());
47    System.Console.WriteLine("b0 after GetI2 - {0}",
48                             b0.GetI2());
49
50    System.Console.WriteLine();
51
52    IC c0 = new D();
53
54    System.Console.WriteLine("c0 after instantiated -");
55    c0.PrintAll();
56
57    c0.SetI1(8);
58    c0.SetI2(5);
59
60    System.Console.WriteLine("c0 after SetI1 and I2 -");
61    c0.PrintAll();
62
63    System.Console.WriteLine("c0 after GetI1 - {0}",
64                             c0.GetI1());
65    System.Console.WriteLine("c0 after GetI2 - {0}",
66                             c0.GetI2());
67
68    System.Console.WriteLine();
69
70    D d0 = new D();
71
72    System.Console.WriteLine("d0 after instantiated -");
73    d0.PrintAll();
74
75    d0.SetI1(8);
76    d0.SetI2(7);
77    d0.SetI3(6);
78
79    System.Console.WriteLine("d0 after SetI1, I2, and I3 -");
80    d0.PrintAll();
81
82    System.Console.WriteLine("d0 after GetI1 - {0}",
83                             d0.GetI1());
84    System.Console.WriteLine("d0 after GetI2 - {0}",
85                             d0.GetI2());
86    System.Console.WriteLine("d0 after GetI3 - {0}",
87                             d0.GetI3());
88  }
89}