-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBottle.cpp
58 lines (43 loc) · 978 Bytes
/
Bottle.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
/*
* Bottle.cpp
*
* Created on: 26.03.2015
* Author: soily
*/
#include "Bottle.h"
#include <iostream>
namespace std {
Bottle::Bottle() {
// TODO Auto-generated constructor stub
this->Volume = 1;
this->KindOfBottle = glass;
}
int Bottle::getVolume(){
return this->Volume;
}
void Bottle::setVolume(int Volume){
this->Volume = Volume;
}
Kind_Of_Bottle Bottle::getKind_Of_Bottle(){
return this->KindOfBottle;
}
void Bottle::setKind_Of_Bottle(Kind_Of_Bottle KindOfBottle){
this->KindOfBottle = KindOfBottle;
}
void Bottle::display_KindOfBottleAndVolume(void){
cout << "My Bottle has a volume of " << this->getVolume() << " litre." << endl;
switch(this->getKind_Of_Bottle()){
case plastic:
cout << "My Bottle is made of " << "plastic" << endl;
break;
case glass:
cout << "My Bottle is made of " << "glass" << endl;
break;
default:
break;
}
}
Bottle::~Bottle() {
// TODO Auto-generated destructor stub
}
} /* namespace std */