-
Notifications
You must be signed in to change notification settings - Fork 0
/
ntoylapia.cpp
51 lines (41 loc) · 1.06 KB
/
ntoylapia.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
#include "ntoylapia.h"
#include <iostream>
using namespace std;
ntoylapia::ntoylapia(int number){
f1(number);
f2(number);
cout<< "construct ntoylapia"<<endl;
}
ntoylapia::~ntoylapia(){
cout<< "destructor ntoylapia"<<endl;
}
void ntoylapia::place_book(int number){
if (number == 4)
if (f1.place_book(b))
cout<<"placing book in top closet self"<<endl;
else if(number == 5)
if (f2.place_book(b))
cout<<"placing book in middle bookcase self"<<endl;
}
int ntoylapia::take_book(int number){
if (number == 1)
return f1.take_book();
else if(number == 2)
return f2.take_book();
}
void ntoylapia::print(){
cout<< endl<< "to pano rafi sto ntoylapi exei mesa ayta ta bibli a: "<< endl;
f1.print();
cout<< endl<< "to pkato rafi sto ntoylapi exei mesa ayta ta biblia: "<< endl;
f2.print();
}
void ntoylapia::print(int number){
if (number == 1){
cout<< endl<< "to pano rafi sto ntoylapi exei mesa ayta ta biblia: "<< endl;
f1.print();
}
else if(number == 2){
cout<< endl<< "to pkato rafi sto ntoylapi exei mesa ayta ta biblia: "<< endl;
f2.print();
}
}