Skip to content

Commit

Permalink
final step
Browse files Browse the repository at this point in the history
  • Loading branch information
Guyunjeong committed Dec 2, 2023
1 parent 1e59158 commit ebcb0a8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from car_park import CarPark
from sensor import EntrySensor, ExitSensor
from display import Display


def main():
car_park = CarPark(location="moondalup", capacity=100, log_file="moondalup.txt")
entry_sensor = EntrySensor(id=1, is_active=True, car_park=car_park)
exit_sensor = ExitSensor(id=2, is_active=True, car_park=car_park)
display = Display(id=1, message="Welcome to Moondalup", is_on=True, car_park=car_park)

for _ in range(10):
entry_sensor.detect_vehicle()

for _ in range(2):
exit_sensor.detect_vehicle()


if __name__ == "__main__":
main()
12 changes: 12 additions & 0 deletions src/moondalup.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FAKE-991 entered at 2023-12-02 20:53:41
FAKE-267 entered at 2023-12-02 20:53:41
FAKE-984 entered at 2023-12-02 20:53:41
FAKE-327 entered at 2023-12-02 20:53:41
FAKE-744 entered at 2023-12-02 20:53:41
FAKE-017 entered at 2023-12-02 20:53:41
FAKE-720 entered at 2023-12-02 20:53:41
FAKE-138 entered at 2023-12-02 20:53:41
FAKE-489 entered at 2023-12-02 20:53:41
FAKE-294 entered at 2023-12-02 20:53:41
FAKE-489 exited at 2023-12-02 20:53:41
FAKE-327 exited at 2023-12-02 20:53:41

0 comments on commit ebcb0a8

Please sign in to comment.