Yurttas/PL/OOL/Java/F/04/01/03/A.java

 1/**
 2 *  Copyright(C) 1998
 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, 1998.
11 *  @authorĀ : Salih Yurttas.
12 */
13
14
15public class A {
16
17  protected int i0;
18  private int i1;
19
20  public A() {
21    i0 = 2;
22    i1 = 2;
23  }
24
25  public A(final int i) {
26    i0 = i;
27    i1 = i;
28  }
29
30  public A(final int i,
31           final int j) {
32    i0 = i;
33    i1 = j;
34  }
35
36  public int geti0() {
37    return i0;
38  }
39
40  public int geti1() {
41    return i1;
42  }
43
44  public int[] geti01() {
45    int[] a = new int[2];
46
47    a[0] = i0;
48    a[1] = i1;
49
50    return a;
51  }
52
53  public void seti0(final int i) {
54    i0 = i;
55  }
56
57  public void seti1(final int i) {
58    i1 = i;
59  }
60
61  public void seti01(final int i) {
62    i0 = i;
63    i1 = i;
64  }
65
66  public void seti01(final int i,
67                     final int j) {
68    i0 = i;
69    i1 = j;
70  }
71
72  public void seti01(final int[] a) {
73    i0 = a[0];
74    i1 = a[1];
75  }
76
77}