-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp07.py
More file actions
32 lines (25 loc) · 1.2 KB
/
Copy pathp07.py
File metadata and controls
32 lines (25 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from manufacturer import AssembleInterior, SendRequirements, CreateTestProtocol
class AirplaneManufacturer:
def __init__(self):
self.teams = {
'vodka_bar': 'Russian team',
'whiskey_bar': 'Irish team',
# Add other teams as needed
}
def produce_airplane(self, specifications: dict):
# Send requirements to different teams
for part, team in self.teams.items():
if part in specifications:
SendRequirements.call([part])
# Wait for parts to be manufactured and delivered
# This can be simulated with a delay or you can implement a real waiting mechanism
# time.sleep(60)
# Assemble the interior of the plane
AssembleInterior.call(specifications['parts'], specifications['product_id'])
# Send the plane on a test flight and create a test protocol
test_protocol = CreateTestProtocol.call()
# Send the test protocol to the manufacturer and the customer
# send_test_protocol(test_protocol, manufacturer, customer)
# Deliver the plane to the customer and wait for confirmation
# deliver_plane(customer)
# wait_for_confirmation(customer)