-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
96 lines (75 loc) · 1.6 KB
/
main.cpp
File metadata and controls
96 lines (75 loc) · 1.6 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
#include <iostream>
class Coffee {
private:
int shot;
int caffine;
bool isMilk;
bool isHot;
bool isTakeout;
public:
Coffee(){
shot = 1;
caffine = 200;
isMilk = false;
isHot = false;
isTakeout = true;
}
Coffee(int _shot){
setShot(_shot);
isMilk = false;
isHot = false;
isTakeout = true;
}
int getShot(){
return shot;
}
int getCaffine(){
return caffine;
}
bool getIsHot(){
return isMilk;
}
bool getIsMilk(){
return isHot;
}
bool getIsTakeout(){
return isTakeout;
}
void setShot(int _shot){
shot = _shot;
caffine = shot * 200;
}
// void setCaffine(int _caffine){
// caffine = _caffine;
// }
void setIsHot(bool _isHot){
isHot = _isHot;
}
void setIsMilk(bool _isMilk){
isMilk = _isMilk;
}
void setIsTakeout(bool _isTakeout){
isTakeout = _isTakeout;
}
};
// Coffee am(){
// return Coffee();
// }
int main() {
// int arr[2] = {0,0};
// int (&tmp)[2] = arr;
int (&tmp)[2] = {0,0};
std::cout << "shot : " << tmp[1] << std::endl;
// Coffee americano = am();
// Coffee americano(2);
// americano.setShot(3);
// americano.setIsMilk(false);
// americano.setIsHot(false);
// americano.setIsTakeout(true);
// std::cout << "shot : " << americano.getShot() << std::endl;
// std::cout << "isHot : " << americano.getIsHot() << std::endl;
// std::cout << "isMilk : " << americano.getIsMilk() << std::endl;
// std::cout << "isTakeout : " << americano.getIsTakeout() << std::endl;
// std::cout << "caffine : " << americano.getCaffine() << std::endl;
return 0;
}