-
Notifications
You must be signed in to change notification settings - Fork 0
/
recipe.h
46 lines (34 loc) · 1.14 KB
/
recipe.h
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
// Header file for recipe class
// Description: This class holds recipes that have instructions, ingredients, and a name.
// The instructions are stored in a vector of strings. The ingredients are stored in a vector of strings.
#ifndef RECIPE_H
#define RECIPE_H
#include <string>
#include <vector>
#include <iostream>
using namespace std;
class Recipe
{
public:
Recipe();
Recipe(string name);
Recipe(string name, vector<string> ingredients);
Recipe(string name, vector<string> ingredients, vector<string> instructions);
void setName(string name);
void setIngredients(vector<string> ingredients);
void setInstructions(vector<string> instructions);
void addIngredient(string ingredient);
void addInstruction(string instruction);
void placeInstruction(string instruction, int index);
void removeIngredient(string ingredient);
void removeInstruction(string instruction);
string getName();
vector<string> getIngredients();
vector<string> getInstructions();
virtual void printRecipe() const;
protected:
string name;
vector<string> ingredients;
vector<string> instructions;
};
#endif