Yurttas/PL/OOL/CS/F/04/03/00/D.cs

From ZCubes Wiki
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   : January 1, 2004.
11 *  @author : Salih Yurttas.
12 */
13
14
15public class D : IB,
16                 IC
17{
18  private int i1,
19              i2,
20              i3;
21
22  public D()
23  {
24    i1 = 0;
25    i2 = 0;
26    i3 = 0;
27  }
28
29  public D(int i)
30  {
31    i1 = i;
32    i2 = i;
33    i3 = i;
34  }
35
36  public D(int i,
37           int j,
38           int k)
39  {
40    i1 = i;
41    i2 = j;
42    i3 = k;
43  }
44
45  public int GetI1()
46  {
47    return i1;
48  }
49
50  public int GetI2()
51  {
52    return i2;
53  }
54
55  public int GetI3()
56  {
57    return i3;
58  }
59
60  public void SetI1(int i)
61  {
62    i1 = i;
63  }
64
65  public void SetI2(int i)
66  {
67    i2 = i;
68  }
69
70  public void SetI3(int i)
71  {
72    i3 = i;
73  }
74
75  public void PrintAll()
76  {
77    System.Console.WriteLine("i1 = {0}", i1);
78    System.Console.WriteLine("i2 = {0}", i2);
79    System.Console.WriteLine("i3 = {0}", i3);
80  }
81}