Skip to content

Commit

Permalink
add packet
Browse files Browse the repository at this point in the history
  • Loading branch information
Fantom245 committed Oct 30, 2024
1 parent 1a67944 commit 23314b5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
Empty file added app/cinema/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions app/cinema/bar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from app.people.customer import Customer


class CinemaBar:
@staticmethod
def sell_product(product: str, customer: Customer) -> None:
print(f"Cinema bar sold {product} to {customer.name}.")
22 changes: 22 additions & 0 deletions app/cinema/hall.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from app.people.customer import Customer
from app.people.cinema_staff import Cleaner


class CinemaHall:
def __init__(self, hall_number: int) -> None:
self.number = hall_number

def movie_session(
self,
movie_name: str,
customers: Customer,
cleaning_staff: Cleaner
) -> None:

print(f'"{movie_name}" started in hall number {self.number}.')

for customer in customers:
customer.watch_movie(movie_name)

print(f'"{movie_name}\" ended.')
cleaning_staff.clean_hall(self.number)
Empty file added app/people/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions app/people/cinema_staff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Cleaner:
def __init__(self, name: str) -> None:
self.name = name

def clean_hall(self, hall_number: int) -> None:
print(f"Cleaner {self.name} is cleaning hall number {hall_number}.")
7 changes: 7 additions & 0 deletions app/people/customer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Customer:
def __init__(self, name: str, food: str) -> None:
self.name = name
self.food = food

def watch_movie(self, movie: str) -> None:
print(f'{self.name} is watching "{movie}".')

0 comments on commit 23314b5

Please sign in to comment.