Yurttas/PL/OOL/Cplusplus/F/03/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::B() { i0=0; i1=2; i2=8; }
20
21B::B(int i) { i0=i; i1=i+1; i2=i+2; }
22
23int B::fi1() { return i1; }
24
25int B::fi2() { return i2; }
26
27void B::fi12(int i) { i1+=i; i2-=i; }
28
29ostream& operator<<(ostream& os,
30 B& b) {
31 os << endl;
32 os << b.i0 << endl;
33 os << b.i1 << endl;
34 os << b.i2 << endl;
35 os << endl;
36
37 return os;
38}