forked from joshua840/snu_programming_methodology_project3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNormalController.cpp
More file actions
46 lines (41 loc) · 1.44 KB
/
NormalController.cpp
File metadata and controls
46 lines (41 loc) · 1.44 KB
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
#include "NormalController.h"
#include "Controller.h"
#include "Food.h"
/**
* Store a given food object into the refrigerator.
*
* This function should follows the 'Modified Shelf First Fit (Shelf-FF) algorithm, which is given in the PPT slide.
* Your implemented algorithm should find the proper position of the new food object.
* The new food object should be initialized in the heap memory and referenced from both food_list and shelves.
*
* @param name The name of the food to be stored
* @param size width and height of the food
* @param exp the expire date of the food
* @return true if inserting the food for both food_list and shelves has been succeed
*/
bool NormalController::stackFood(const string name, intPair foodSize, int exp)
{
/**
* ===============================================
* ======== TODO: Implement this function ========
* ===============================================
*/
return false;
}
/**
* Pop a food with shortest expire date from both foodList and shelves.
* This function does not return the object.
* The pop process should follows the algorithm in PPT slide.
*
* @param food_name a name of food to be popped
* @return
*/
bool NormalController::popFood(const string food_name)
{
/**
* ===============================================
* ======== TODO: Implement this function ========
* ===============================================
*/
return false;
}