forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
driver.py
50 lines (36 loc) · 1.06 KB
/
driver.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
from enum import Enum
class DriverStatus(Enum):
AVAILABLE = 1
BUSY = 2
class Driver:
def __init__(self, id, name, contact, license_plate, location, status):
self.id = id
self.name = name
self.contact = contact
self.license_plate = license_plate
self.location = location
self.status = status
def set_id(self, id):
self.id = id
def set_name(self, name):
self.name = name
def set_contact(self, contact):
self.contact = contact
def set_license_plate(self, license_plate):
self.license_plate = license_plate
def set_location(self, location):
self.location = location
def set_status(self, status):
self.status = status
def get_id(self):
return self.id
def get_name(self):
return self.name
def get_contact(self):
return self.contact
def get_license_plate(self):
return self.license_plate
def get_location(self):
return self.location
def get_status(self):
return self.status