-
Notifications
You must be signed in to change notification settings - Fork 0
/
bibliothiki.cpp
83 lines (72 loc) · 2 KB
/
bibliothiki.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include "bibliothiki.h"
#include <iostream>
using namespace std;
bibliothiki::bibliothiki(int number){
f1(number);
f2(number);
f2(number);
n1(number);
cout<< "construct bibliyhikis"<<endl;
}
bibliothiki::~bibliothiki(){
cout<< "destructor bibliyhikis"<<endl;
}
void bibliothiki::place_book(int number, biblia b){
if (number == 1)
if (f1.place_book(b))
cout<<"placing book in top bookcase self"<<endl;
else if(number == 2)
if (f2.place_book(b))
cout<<"placing book in middle bookcase self"<<endl;
else if (number == 3)
if(f3.place_book(b))
cout<<"placing book in down bookcase self"<<endl;
else if(number == 4)
if(n1.place_book(number, b))
cout<<"placing book in top closet self"<<endl;
else if(number == 5)
if (n1.place_book(number, b))
cout<<"placing book in down closet self"<<endl;
}
void bibliothiki::take_book(int number){
if (number == 1)
if (f1.take_book())
cout<<"taking book in top bookcase self"<<endl;
else if(number == 2)
if (f2.take_book())
cout<<"taking book in middle bookcase self"<<endl;
else if (number == 3)
if (f3.take_book())
cout<<"taking book in down bookcase self"<<endl;
else if(number == 4)
if(n1.take_book(number))
cout<<"taking book in top closet self"<<endl;
else if(number == 5)
if (n1.take_book(number))
cout<<"taking book in down closet self"<<endl;
}
void bibliothiki::print(){
cout<< endl<< "to pano rafi exei mesa ayta ta biblia: "<<endl;
f1.print();
cout<< endl<< "to meseo rafi exei mesa ayta ta biblia: "<<endl;
f2.print();
cout<< endl<< "to kato rafi exei mesa ayta ta biblia: "<<endl;
f3.print();
n1.print();
}
void bibliothiki::print(int number){
if (number == 1){
cout<< endl<< "to pano rafi exei mesa ayta ta biblia: "<<endl;
f1.print();
}
else if(number == 2){
cout<< endl<< "to meseo rafi exei mesa ayta ta biblia: "<<endl;
f2.print();
}
else if (number == 3){
cout<< endl<< "to kato rafi exei mesa ayta ta biblia: "<<endl;
f3.print();
}
else if((number == 4) || (number == 5))
n1.print(number);
}