/
requirement13.txt
127 lines (126 loc) · 4.28 KB
/
requirement13.txt
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
###################################################
# valgrind --leak-check=full --show-reachable=yes #
###################################################
[s3557766@csitprdap01 Assignment 2]$ valgrind --leak-check=full --show-reachable=yes ./ppd stock2.dat coins2.dat
==54424== Memcheck, a memory error detector
==54424== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==54424== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==54424== Command: ./ppd stock2.dat coins2.dat
==54424==
Main Menu:
1.Display Items
2.Purchase Items
3.Save and Exit
Administrator-Only Menu:
4.Add Item
5.Remove Item
6.Display Coins
7.Reset Stock
8.Reset Coins
9.Abort Program
Select your option (1-9):4
The new meal item will have a the Item id of I0006.
Enter the item name: Baklava
Enter the item description: rich, sweet pastry made of layers of filo filled with chopped nuts and sweetened and held together with syrup or honey.
Enter the price of the item: 8.00
This item "Baklava - rich, sweet pastry made of layers of filo filled with chopped nuts and sweetened and held together with syrup or honey." has now been added to the menu.
Main Menu:
1.Display Items
2.Purchase Items
3.Save and Exit
Administrator-Only Menu:
4.Add Item
5.Remove Item
6.Display Coins
7.Reset Stock
8.Reset Coins
9.Abort Program
Select your option (1-9):5
Enter the item id of the item to remove from the menu:I0006
"I0006 - Baklava rich, sweet pastry made of layers of filo filled with chopped nuts and sweetened and held together with syrup or honey." has been removed from the system.
Main Menu:
1.Display Items
2.Purchase Items
3.Save and Exit
Administrator-Only Menu:
4.Add Item
5.Remove Item
6.Display Coins
7.Reset Stock
8.Reset Coins
9.Abort Program
Select your option (1-9):9
Exiting Program...
==54424==
==54424== HEAP SUMMARY:
==54424== in use at exit: 0 bytes in 0 blocks
==54424== total heap usage: 21 allocs, 21 frees, 5,040 bytes allocated
==54424==
==54424== All heap blocks were freed -- no leaks are possible
==54424==
==54424== For counts of detected and suppressed errors, rerun with: -v
==54424== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
################################
# valgrind --track-origins=yes #
################################
[s3557766@csitprdap01 Assignment 2]$ valgrind --track-origins=yes ./ppd stock.dat coins.dat
==56149== Memcheck, a memory error detector
==56149== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==56149== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==56149== Command: ./ppd stock.dat coins.dat
==56149==
Main Menu:
1.Display Items
2.Purchase Items
3.Save and Exit
Administrator-Only Menu:
4.Add Item
5.Remove Item
6.Display Coins
7.Reset Stock
8.Reset Coins
9.Abort Program
Select your option (1-9):4
The new meal item will have a the Item id of I0006.
Enter the item name: Baklava
Enter the item description: rich, sweet pastry made of layers of fio filled with chopped nuts and sweetened and held together with syrup or honey.
Enter the price of the item: 8.00
This item "Baklava - rich, sweet pastry made of layers of fio filled with chopped nuts and sweetened and held together with syrup or honey." has now been added to the menu.
Main Menu:
1.Display Items
2.Purchase Items
3.Save and Exit
Administrator-Only Menu:
4.Add Item
5.Remove Item
6.Display Coins
7.Reset Stock
8.Reset Coins
9.Abort Program
Select your option (1-9):5
Enter the item id of the item to remove from the menu:I0006
"I0006 - Baklava rich, sweet pastry made of layers of fio filled with chopped nuts and sweetened and held together with syrup or honey." has been removed from the system.
Main Menu:
1.Display Items
2.Purchase Items
3.Save and Exit
Administrator-Only Menu:
4.Add Item
5.Remove Item
6.Display Coins
7.Reset Stock
8.Reset Coins
9.Abort Program
Select your option (1-9):3
Stock details successfully stored as stock.dat.
Coin details successfully stored as coins.dat.
Exiting Program...
==56149==
==56149== HEAP SUMMARY:
==56149== in use at exit: 0 bytes in 0 blocks
==56149== total heap usage: 23 allocs, 23 frees, 6,176 bytes allocated
==56149==
==56149== All heap blocks were freed -- no leaks are possible
==56149==
==56149== For counts of detected and suppressed errors, rerun with: -v
==56149== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)