Yurttas/PL/SL/python/F/08/00/01/01/A.cpp
Jump to navigation
Jump to search
1/*
2 Copyright(C) 1998
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, 1998.
11 author : Salih Yurttas.
12
13 A.cpp
14*/
15
16
17#include "A.h"
18
19A::
20A(const int a,
21 const int b) : i1(a),
22 i2(b) {
23}
24
25A::
26A(const A& a) : i1(a.i1),
27 i2(a.i2) {
28}
29
30A&
31A::
32operator=(const A& a) {
33 i1 = a.i1;
34 i2 = a.i2;
35 return *this;
36}
37
38int
39A::
40get_i1() const {
41 return i1;
42}
43
44int
45A::
46get_i2() const {
47 return i2;
48}
49
50void
51A::
52set_i1(const int a) {
53 i1 = a;
54}
55
56void
57A::
58set_i2(const int a) {
59 i2 = a;
60}
61
62void
63A::
64set_i1_i2(const int a) {
65 i1 = a;
66 i2 = a;
67}
68
69void
70A::
71set_i1_i2(const int a,
72 const int b) {
73 i1 = a;
74 i2 = b;
75}
76
77ostream& operator<<(ostream& os,
78 const A& a) {
79 os << a.i1;
80 os << endl;
81 os << a.i2;
82 os << endl;
83
84 return os;
85}