-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfile.py
More file actions
65 lines (53 loc) · 1.69 KB
/
Copy pathProfile.py
File metadata and controls
65 lines (53 loc) · 1.69 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
"""
Final Project in CSIT335
Group 18 Members: Lhora Mae Alvarez, Mel Jay Llanos, and Jecee Ryn Obrero
Findrr - Online Dating Application
Findrr is a simple online dating app where users find the romance of their life.
Users can like or dislike the profiles of other users.
Findrr also employs a "double opt-in" mechanism, in which both users must match in order to send messages.
"""
class Profile():
id: int = 0
name: str = ""
age: int = 0
address: str = ""
gender: str = ""
isValid: bool = False
isPremium: bool = False
likeList: list = []
matchList: list = []
rewindList: list = []
def __init__(
self,
id: int = 0,
name: str = "",
age: int = 0,
address: str = "",
gender: str = "",
isPremium: bool = False
) -> None:
self.id = id
self.name = name
self.age = age
self.address = address
self.gender = gender
self.isValidProfile()
self.isPremium = isPremium
self.likeList = []
self.matchList = []
self.rewindList = []
def _isBlank(self, string: str):
return string == ""
def isValidProfile(self):
if not self._isBlank(self.name) and not self._isBlank(self.address) and not self._isBlank(self.gender):
if self.age >= 18:
self.isValid = True
def addToLikeList(self, id: int):
if id not in self.likeList:
self.likeList.append(id)
def addToMatchList(self, id: int):
if id not in self.matchList:
self.matchList.append(id)
def addToRewindList(self, id: int):
if id not in self.rewindList:
self.rewindList.append(id)