Yurttas/PL/OOL/Cplusplus/F/03/01/01/00/B.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 B.cpp
14*/
15
16
17#include "B.h"
18
19B::
20B(const int i) : i1(i),
21 i2(2*i) {
22}
23
24B::
25B(const B& b) : i1(b.i1),
26 i2(b.i2) {
27}
28
29int
30B::
31get_i1() const {
32 return i1;
33}
34
35int
36B::
37get_i2() const {
38 return i2;
39}
40
41void
42B::
43set_i1_i2(const int i) {
44 i1=i;
45 i2=i;
46}
47
48ostream& operator<<(ostream& os,
49 const B& b) {
50 os << endl;
51 os << b.i1 << endl;
52 os << b.i2 << endl;
53 os << endl;
54
55 return os;
56}