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 ABCD03
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.I1 = 3;
25 a0.I2 = 1;
26 a0.I3 = 2;
27
28 System.Console.WriteLine("a0 after SetI1, I2, and I3 -");
29 a0.PrintAll();
30
31 System.Console.WriteLine("a0 after GetI1 - {0}",
32 a0.I1);
33 System.Console.WriteLine("a0 after GetI2 - {0}",
34 a0.I2);
35 System.Console.WriteLine("a0 after GetI3 - {0}",
36 a0.I3);
37
38 System.Console.WriteLine();
39
40 B b0 = new D();
41
42 System.Console.WriteLine("b0 after instantiated -");
43 b0.PrintAll();
44
45 b0.I1 = 2;
46 b0.I2 = 7;
47 b0.I2 = 4;
48
49 System.Console.WriteLine("b0 after SetI1, I2, and I3 -");
50 b0.PrintAll();
51
52 System.Console.WriteLine("b0 after GetI1 - {0}",
53 b0.I1);
54 System.Console.WriteLine("b0 after GetI2 - {0}",
55 b0.I2);
56 System.Console.WriteLine("b0 after GetI3 - {0}",
57 b0.I3);
58
59 System.Console.WriteLine();
60
61 IC c0 = new D();
62
63 System.Console.WriteLine("c0 after instantiated -");
64 c0.PrintAll();
65
66 c0.I1 = 8;
67 c0.I2 = 5;
68 c0.I3 = 9;
69
70 System.Console.WriteLine("c0 after SetI1, I2, and I3 -");
71 c0.PrintAll();
72
73 System.Console.WriteLine("c0 after GetI1 - {0}",
74 c0.I1);
75 System.Console.WriteLine("c0 after GetI2 - {0}",
76 c0.I2);
77 System.Console.WriteLine("c0 after GetI3 - {0}",
78 c0.I3);
79
80 System.Console.WriteLine();
81
82 D d0 = new D();
83
84 System.Console.WriteLine("d0 after instantiated -");
85 d0.PrintAll();
86
87 d0.I1 = 8;
88 d0.I2 = 7;
89 d0.I3 = 6;
90 d0.I4 = 2;
91
92 System.Console.WriteLine("d0 after SetI1, I2, I3, and I4 -");
93 d0.PrintAll();
94
95 System.Console.WriteLine("d0 after GetI1 - {0}",
96 d0.I1);
97 System.Console.WriteLine("d0 after GetI2 - {0}",
98 d0.I2);
99 System.Console.WriteLine("d0 after GetI3 - {0}",
100 d0.I3);
101 System.Console.WriteLine("d0 after GetI4 - {0}",
102 d0.I4);
103 }
104}