-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCandy.py
More file actions
83 lines (58 loc) · 2.6 KB
/
Candy.py
File metadata and controls
83 lines (58 loc) · 2.6 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
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
class Candy:
countID = 0
def __init__(self, candyName, candyStockLevel, candyRetailPrice, candyCostPrice, candyCategory, candyImage, candySupplier, candyKeyInformation, candyIngredients, candyCountry):
self.__class__.countID += 1 # User.countID += 1 (more tedious because if you were to change the class name, you have to keep changing this too)
self.__candyID = self.__class__.countID
self.__candyID = Candy.countID
self.__candyCategory = candyCategory
self.__candyRetailPrice = candyRetailPrice
self.__candyCostPrice = candyCostPrice
self.__candyStockLevel = 0
self.__candyName = candyName
self.__candyImage = candyImage
self.__candySupplier = candySupplier
self.__candyKeyInformation = candyKeyInformation
self.__candyIngredients = candyIngredients
self.__candyCountry = candyCountry
def set_candyCategory(self, candyCategory):
self.__candyCategory = candyCategory
def set_candyRetailPrice(self, retail):
self.__candyRetailPrice = retail
def set_candyCostPrice(self, cost):
self.__candyCostPrice = cost
def set_candyStockLevel(self, stock):
self.__candyStockLevel = stock
def set_candyName(self, name):
self.__candyName = name
def set_candyImage(self, candyImage):
self.__candyImage = candyImage
def set_candySupplier(self, candySupplier):
self.__candySupplier = candySupplier
def set_candyKeyInformation(self, candyKeyInformation):
self.__candyKeyInformation = candyKeyInformation
def set_candyIngredients(self, candyIngredients):
self.__candyIngredients = candyIngredients
def set_candyCountry(self, candyCountry):
self.__candyCountry = candyCountry
def get_candyCategory(self):
return self.__candyCategory
def get_candyRetailPrice(self):
return self.__candyRetailPrice
def get_candyCostPrice(self):
return self.__candyCostPrice
def get_candyStockLevel(self):
return self.__candyStockLevel
def get_candyName(self):
return self.__candyName
def get_candyID(self):
return self.__candyID
def get_candyImage(self):
return self.__candyImage
def get_candySupplier(self):
return self.__candySupplier
def get_candyKeyInformation(self):
return self.__candyKeyInformation
def get_candyIngredients(self):
return self.__candyIngredients
def get_candyCountry(self):
return self.__candyCountry