-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsoup.cpp
More file actions
34 lines (28 loc) · 694 Bytes
/
soup.cpp
File metadata and controls
34 lines (28 loc) · 694 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
// soup.cpp
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include "halfmeal.h"
#include "soup.h"
#include "ingredient.h"
#include "fooddatabase.h"
using std::string;
using std::vector;
using std::pair;
using std::cout;
using std::endl;
Soup::Soup( const FoodDatabase& fdb, const vector< pair< string, size_t > >& used, const vector< pair< string, size_t > >& haveLeft, size_t freq) : Halfmeal( freq )
{
m_soup = getIngred("soup", fdb, used, haveLeft);
m_foodNames.push_back(m_soup.getName());
}
void Soup::printHalfmeal() const
{
cout << "Soup: " << m_soup << endl;
}
double Soup::getCost() const
{
double cost = m_soup.getCost();
return cost;
}