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

Revision as of 22:03, 6 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="cpp" line start="1" enclose="div">/* Copyright(C) 1998 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. Perm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 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_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 b_0;
26
27  cout << "initial values after default construction-B() /" << endl;
28  cout << b_0 << endl;
29  cout << endl;
30
31  cout << "private k value after default construction-B() /" << endl;
32  cout << endl;
33  cout << b_0.get_k() << endl;
34  cout << endl;
35
36  B b_1(2);
37
38  cout << "initial values after construction-B(int) /" << endl;
39  cout << b_1 << endl;
40  cout << endl;
41
42  cout << "private k value after construction-B(int) /" << endl;
43  cout << endl;
44  cout << b_1.get_k() << endl;
45  cout << endl;
46
47  B b_2(b_1);
48
49  cout << "initial values after construction-B(B&) /" << endl;
50  cout << b_2 << endl;
51  cout << endl;
52
53  cout << "initial values after construction-B(B&) /" << endl;
54  cout << b_1 << endl;
55  cout << endl;
56
57  b_0 = b_1;
58
59  cout << "values after assignment(=) /" << endl;
60  cout << b_0 << endl;
61  cout << endl;
62
63  cout << "values after assignment(=) /" << endl;
64  cout << b_1 << endl;
65  cout << endl;
66
67  cout << "b_0.get_A() /" << endl;
68  cout << b_0.get_A() << endl;
69  cout << endl;
70
71}