This repository was archived by the owner on Dec 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.h
79 lines (69 loc) · 2.21 KB
/
Menu.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
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
#ifndef MENU_H_
#define MENU_H_
#include <iostream>
#include <string>
#include <stdexcept>
#include <vector>
//other types
#include "Category.h"
#include "Menu_Item.h"
#include "Recipe.h"
#include "Ingredient.h"
#include "Instructions.h"
#include "Order.h"
#include "Order_Item.h"
#include "Description.h" //S.X.-A.3
#include "Time.h" //L.C., A2
#include "Date.h" //L.C., A2
using namespace std;
class Menu {
public:
struct InvalidData : std::runtime_error {
InvalidData(): runtime_error("Invalid input data format") {}
};
struct InvalidFile : std::runtime_error {
InvalidFile(): runtime_error("Invalid input file name") {}
};
enum Main_menu_options{ Info=1, Read, Show, Find, Update, Exit };
Menu();
void display_main_menu() const;
void display_info() const;//display assignment info & your name plus "Project Part I"
void read();
void update();
void show() const;
void find() const;
private:
//private data
void readRecipeIng(); //M.O. A.1
void readOrderOrderItem(); //L.C. A.2
void readMenuDescr(); //S.X. A.3
void showAnItemRecipe() const; //S.X. B.1a
void showMenuItem() const; //L.C. B.1b
void showCatagoryItem() const; //M.O. B.1c
void displayTotalSalesTable() const; //L.C. B.2a
void displayTotalSalesServer() const; //S.X. B.2b
void findMenuItem() const; //M.O. B.2c
void updateOrderItem(); //M.O. B.3a
void updateMenuItem(); //L.C. B.3b
void updateCategories(); //S.X. B.3c
void ListOrderByDate() const; //S.X. C.1a
void ListItemByPrice() const; //S.X. C.1b
void displayTop5MenuItems() const; //L.C. C.2c
void displayTopOrderTabPrice() const; //L.C. C.2d
void updateOrder(); //M.O. C.3e
void updateRecipe(int RecipeID); //M.O. C.3f
void updateMenuItem2(); //M.O. C.3f
void deleteOrder(); //M.O. C.3
void deleteMenuItem(); //M.O. C.3
void writeCatMenu() const; //M.O. D.1
void writeOrders() const; //M.O. D.1
void writerecipes() const; //M.O. D.1
//vector<struct OrderByDate> orderbydate;
vector<Category> categories;
vector<Menu_Item> menu_items;
vector<Recipe> recipes;
vector<Ingredient> ingredients;
vector<Order> orders;
vector<Order_Item> order_items;
};
#endif //MENU_H_