-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}".') |