Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mykyta-mitin committed Jan 7, 2025
1 parent b45df58 commit 3ccb0a9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/cinema/bar.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from app.people.customer import Customer


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


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

def movie_session(self, movie_name: str, customers: list[Customer], cleaning_staff: Cleaner) -> None:
def movie_session(self, movie_name: str, customers: list[Customer],
cleaning_staff: Cleaner) -> None:
print(f"'{movie_name}' started in hall number {self.hall_number}.")
for customer in customers:
customer.watch_movie(movie_name)
Expand Down
3 changes: 1 addition & 2 deletions app/people/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ def __init__(self, name: str, food: str) -> None:
self.food = food

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

print(f"{self.name} is watching '{movie}'.")

0 comments on commit 3ccb0a9

Please sign in to comment.