-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrecipe.py
54 lines (44 loc) · 1.45 KB
/
recipe.py
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
#Parent Class
class Recipe:
def __init__(self, recipeName, image, serving, cooktime, ingredient, method, link, recipeid):
# self.__recipeid = ""
self.__recipeid = recipeid
self.__recipeName = recipeName
self.__image = image
self.__serving = serving
self.__cooktime = cooktime
self.__ingredient = ingredient
self.__method = method
self.__link = link
def get_recipeid(self): #just added get & set
return self.__recipeid
def set_recipeid(self, recipeid):
self.__recipeid = recipeid
def get_recipeName(self):
return self.__recipeName
def set_recipeName(self, recipeName):
self.__recipeName = recipeName
def get_image(self):
return self.__image
def set_image(self, image):
self.__image = image
def get_serving(self):
return self.__serving
def set_serving(self, serving):
self.__serving = serving
def get_cooktime(self):
return self.__cooktime
def set_cooktime(self, cooktime):
self.__cooktime = cooktime
def get_ingredient(self):
return self.__ingredient
def set_ingredient(self, ingredient):
self.__ingredient = ingredient
def get_method(self):
return self.__method
def set_method(self, method):
self.__method = method
def get_link(self):
return self.__link
def set_link(self, link):
self.__link = link