Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Fantom245 committed Oct 30, 2024
1 parent 34368d1 commit 1a67944
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
29 changes: 25 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# write your imports here
from app.cinema.bar import CinemaBar
from app.cinema.hall import CinemaHall
from app.people.customer import Customer
from app.people.cinema_staff import Cleaner


def cinema_visit(customers: list, hall_number: int, cleaner: str, movie: str):
# write you code here
pass
def cinema_visit(
customers: list,
hall_number: int,
cleaner_name: str,
movie: str
) -> None:

hall = CinemaHall(hall_number=hall_number)
cleaner = Cleaner(name=cleaner_name)

customer_instances = []
for i in customers:
customer = Customer(name=i["name"], food=i["food"])
customer_instances.append(customer)
CinemaBar.sell_product(product=customer.food, customer=customer)

hall.movie_session(
movie_name=movie,
customers=customer_instances,
cleaning_staff=cleaner
)
2 changes: 1 addition & 1 deletion tests/test_hall.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def test_cinema_hall_constructor():
ch = CinemaHall(number=6)
ch = CinemaHall(hall_number=6)
assert hasattr(ch, "number"), (
"CinemaHall instance should have 'number' attribute"
)
Expand Down

0 comments on commit 1a67944

Please sign in to comment.