1/*
2 Copyright(C) 2002
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, 2002.
11 authorĀ : Salih Yurttas.
12
13 B.cpp
14*/
15
16
17#include "B.h"
18
19B::
20B(const int a,
21 const int b) : i0(a),
22 i1(b) {
23}
24
25B::
26B(const B& a) : i0(a.i0),
27 i1(a.i1) {
28}
29
30B&
31B::
32operator=(const B& a) {
33 if(this==&a) return *this;
34
35 i0 = a.i0;
36 i1 = a.i1;
37
38 return *this;
39}
40
41int
42B::
43get_i0() const {
44 return i0;
45}
46
47int
48B::
49get_i1() const {
50 return ++i1;
51}
52
53void
54B::
55set_i0(const int a) {
56 i0 = a;
57}
58
59void
60B::
61set_i1(const int a) {
62 i1 = a;
63}
64
65ostream&
66operator<<(ostream& os,
67 const B& b) {
68 os << b.i0 << endl;
69 os << b.i1 << endl;
70 os << endl;
71
72 return os;
73}