Yurttas/PL/OOL/CS/F/04/00/A.cs

From ZCubes Wiki
Revision as of 08:05, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="csharp" line start="1" enclose="div">/** * Copyright(C) 2003 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. * * ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/**
 2 *  Copyright(C) 2003
 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, 2003
11 *  @author : Salih Yurttas
12 */
13
14
15using System;
16
17public class A
18{
19  private int i1;
20  private int i2;
21
22  public A()
23  {
24    i1 = 2;
25    i2 = 4;
26  }
27
28  public A(int i1,
29           int i2)
30  {
31    this.i1 = i1;
32    this.i2 = i2;
33  }
34
35  public int I1
36  {
37    get
38    {
39      return i1;
40    }
41    set
42    {
43      i1 = value;
44    }
45  }
46
47  public int I2
48  {
49    get
50    {
51      return i2;
52    }
53    set
54    {
55      i2 = value;
56    }
57  }
58
59  public void MA1(int i)
60  {
61    i1 += i;
62    i2 -= i;
63  }
64
65  public void Output()
66  {
67    Console.WriteLine();
68
69    Console.WriteLine(i1);
70    Console.WriteLine(i2);
71
72    Console.WriteLine();
73  }
74}