Yurttas/PL/OOL/Java/F/04/01/10/02/ABCD01.java
Jump to navigation
Jump to search
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 ABCD01 {
16
17 public static void main(String[] args) {
18
19 A a0 = new D();
20
21 System.out.println("a0 after instantiated -");
22 a0.printAll();
23
24 a0.setI1(3);
25
26 System.out.println("a0 after setI1 -");
27 a0.printAll();
28
29 System.out.println("a0 after getI1 - " +
30 a0.getI1());
31
32 System.out.println();
33
34 B b0 = new D();
35
36 System.out.println("b0 after instantiated -");
37 b0.printAll();
38
39 b0.setI1(2);
40 b0.setI2(7);
41
42 System.out.println("b0 after setI1 and I2 -");
43 b0.printAll();
44
45 System.out.println("b0 after getI1 - " +
46 b0.getI1());
47 System.out.println("b0 after getI2 - " +
48 b0.getI2());
49
50 System.out.println();
51
52 C c0 = new D();
53
54 System.out.println("c0 after instantiated -");
55 c0.printAll();
56
57 c0.setI1(8);
58 c0.setI2(5);
59
60 System.out.println("c0 after setI1 and I2 -");
61 c0.printAll();
62
63 System.out.println("c0 after getI1 - " +
64 c0.getI1());
65 System.out.println("c0 after getI2 - " +
66 c0.getI2());
67
68 System.out.println();
69
70 D d0 = new D();
71
72 System.out.println("d0 after instantiated -");
73 d0.printAll();
74
75 d0.setI1(8);
76 d0.setI2(7);
77 d0.setI3(6);
78
79 System.out.println("d0 after setI1, I2, and I3 -");
80 d0.printAll();
81
82 System.out.println("d0 after getI1 - " +
83 d0.getI1());
84 System.out.println("d0 after getI2 - " +
85 d0.getI2());
86 System.out.println("d0 after getI3 - " +
87 d0.getI3());
88
89 }
90
91}