Skip to content

Commit 262fc8d

Browse files
committed
Update to coordinates.py to implement creational design pattern
1 parent 7494a4f commit 262fc8d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/coordinates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class CoordinateFactory:
33
def create_coordinate(creation_type:int, data:float):
44
if creation_type == 1: new_coordinate = Latitude(data)
55
if creation_type == 2: new_coordinate = Longitude(data)
6+
return new_coordinate
67
class Coordinate:
78
pass
89
class Latitude(Coordinate):

0 commit comments

Comments
 (0)