Yurttas/PL/OOL/Java/F/02/04/02/00/IA.java

Revision as of 13:44, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="java" line start="1" enclose="div">/** * Copyright(C) 2004 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. * * P...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 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   : September 1, 2004.
11 *  author : Salih Yurttas.
12 */
13
14
15public class IA {
16
17  private final static int N=4;
18  private int[] a0;
19
20  public IA(final int v) {
21    this.a0 = new int[N];
22    for(int i=0; i<N; i++)
23      this.a0[i] = v;
24  }
25
26  public int getSize() {
27    return this.N;
28  }
29
30  public int[] getA0() {
31    return this.a0;
32  }
33
34  public void setA0(final int v) {
35    for(int i=0; i<N; i++)
36      this.a0[i] = v;
37  }
38
39  public void output() {
40    for(int i=0; i<N; i++)
41      System.out.println(this.a0[i]);
42    System.out.println();
43  }
44
45}