Yurttas/PL/OOL/Java/F/04/01/10/03/D.java

 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 D extends B
16               implements C {
17
18  private int i4;
19
20  public D() {
21    i1 = 0;
22    i2 = 0;
23    i3 = 0;
24    i4 = 0;
25  }
26
27  public D(final int i) {
28    i1 = i;
29    i2 = i;
30    i3 = i;
31    i4 = i;
32  }
33
34  public D(final int i,
35           final int j,
36           final int k,
37           final int l) {
38    i1 = i;
39    i2 = j;
40    i3 = k;
41    i4 = k;
42  }
43
44  public int getI4() {
45    return i4;
46  }
47
48  public void setI4(final int i) {
49    i4 = i;
50  }
51
52  public void printAll() {
53    System.out.println("i1 = " + i1);
54    System.out.println("i2 = " + i2);
55    System.out.println("i3 = " + i3);
56    System.out.println("i4 = " + i4);
57  }
58
59  public void printAll(final String s) {
60    System.out.println(s);
61    System.out.println("i1 = " + i1);
62    System.out.println("i2 = " + i2);
63    System.out.println("i3 = " + i3);
64    System.out.println("i4 = " + i4);
65  }
66
67}