-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbakery.cpp
95 lines (56 loc) · 1.77 KB
/
bakery.cpp
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
/*
* File: bakery.cpp
* Authors: Christian Muise and Rod Naugler
* Created on November 21, 2016
*/
/* PREPROCESSOR DIRECTIVES */
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <deque>
#include <list>
using namespace std;
#include "bakery.h"
#include "customer.h"
#include "equipment.h"
#include "foodItem.h"
#include "supplier.h"
#include "tallySheet.h"
#define CLOSING_TIME 16*60
// Include all necessary standard headers...
// ... and custom headers
// Define Constants as required
/* CLASS DECLARATION */
// Don't actually; declare classes and define their functions in files to be included above
int main(void)
{
// Initialize variables
list<Customer> custMaster;
list<FoodItem> foodMaster;
list<Customer*> mall; // Store loiterers that may will return
bakery();
// Read Input files
// Open-up shop
// Iterate minute-by-minute through day
for(int time = 1; time<=CLOSING_TIME; time++){
// Trash expiried food
// End prep time on cooled items
// Form queue from returning customers in mall...
// ... and then newly arriving customers
// If there are customers queued, sell possible items
// Transfer baked items into storage locations
// Sell all possible newly ready items
// Begin baking raw items
// Receive and store orders
// Begin baking all possible newly arrived items
// If queued customers remain, transfer them to mall if they will return...
// ... otherwise dismiss them outright.
//
// IF AN ORDER COULD ARRIVE IN TIME TO BE PROCESSED AND SOLD
// Order items if the number of items on order is less than the empty storage slots plus
}
// Trash remaining stock; Use CLOSING_TIME as necessary
// Write reports
// close i/o files
}