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