Yurttas/PL/OOL/CS/F/06/01/02/TA02.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   : September 1, 2004.
11 *  authorĀ : Salih Yurttas.
12 */
13
14
15public class TA02 {
16
17  public static void main(String[] args) {
18    TA<Integer,
19       Double> o1 = new TA<Integer,
20                           Double>(2,
21                                   2.0);
22    o1.output();
23
24    int n = o1.getSize0();
25
26    int[] ia = new int[n];
27
28    ia = o1.getA0();
29
30    for(int i=0; i<n; i++)
31      System.out.println(ia[i]);
32
33    System.out.println();
34
35    n = o1.getSize1();
36
37    double da = new double[n];
38
39    da = o1.getA1();
40
41    for(int i=0; i<n; i++)
42      System.out.println(da[i]);
43
44    System.out.println();
45
46    o1.setA0(4);
47    o1.setA1(7.0);
48
49    o1.output();
50  }
51
52}