Yurttas/PL/OOL/CS/F/03/00/10/01/A.cs
Jump to navigation
Jump to search
1/**
2 * Copyright(C) 2006
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, 2006.
11 * author : Salih Yurttas.
12 *
13 * A.cs
14 */
15
16
17using System;
18
19public class A : IA
20{
21 private int sa1;
22 private int[] a1;
23
24 public int SA1
25 {
26 get
27 {
28 return a1.Length;
29 }
30 }
31
32 public int[] A1
33 {
34 get
35 {
36 return a1;
37 }
38 set
39 {
40 a1 = value;
41 }
42 }
43
44 public A()
45 {
46 this.sa1 = 2;
47 this.a1 = new int[this.sa1];
48
49 for(int i=0; i<this.sa1; ++i)
50 this.a1[i] = 1;
51 }
52
53 public A(int[] v)
54 {
55 this.sa1 = sa1;
56 this.a1 = new int[this.sa1];
57
58 for(int i=0; i<this.sa1; ++i)
59 this.a1[i] = v[i];
60 }
61
62 public void Output()
63 {
64 foreach(int i in a1)
65 Console.WriteLine(i);
66 Console.WriteLine();
67 }
68}