Yurttas/PL/OOL/Cplusplus/F/03/01/01/04/b 00.cpp

From ZCubes Wiki
Jump to navigation Jump to search
 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_00.cpp
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21#include "B.h"
22
23int main(int argc, char* argv[]) {
24
25  B a1(1,3);
26
27  cout << "a1 values after construction-B(1,3) /" << endl;
28  cout << a1 << endl;
29
30  a1.set_i0(7);
31  a1.set_i1(8);
32
33  cout << "a1 values after set_i0 and set_i1 /" << endl;
34  cout << a1 << endl;
35
36  B a2(4,2);
37
38  cout << "a2 values after construction-B(4,2) /" << endl;
39  cout << a2 << endl;
40
41  a1 = a2;
42
43  cout << "a1 and a2 values after a1 = a2 /" << endl;
44  cout << a1 << endl;
45  cout << a2 << endl;
46
47  cout << "a1 values by get_i0 and get_i1 /" << endl;
48  cout << a1.get_i0() << endl;
49  cout << a1.get_i1() << endl;
50
51}