forked from PLLUG-Community-C-Qt-Roadmap/CPPQT-MenuForCafe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenuitem.cpp
More file actions
38 lines (30 loc) · 667 Bytes
/
Copy pathmenuitem.cpp
File metadata and controls
38 lines (30 loc) · 667 Bytes
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
#include "menuitem.h"
MenuItem::MenuItem(const std::string &name,
const double price,
const int weight,
std::vector<std::string> &ingredients)
: AbstractMenuItem{name}
, mPrice{price}
, mWeight{weight}
, mIngredients{ingredients}
{
}
MenuItem::~MenuItem() {}
MenuItem::MenuItem(const std::string &name,
const double price)
: AbstractMenuItem{name}
, mPrice{price}
{
}
std::vector<std::string> MenuItem::ingredients() const
{
return mIngredients;
}
double MenuItem::price() const
{
return mPrice;
}
int MenuItem::weight() const
{
return mWeight;
}