Concurrent Execution of Threads

# Introduction In this challenge, we will simulate an ambulance dispatch system using thread join to prioritize emergency situations. The goal is to implement two classes: `EmergencyThread` that simulates the dispatch status during emergencies, and `JoinThread` that tests the emergency dispatch taking priority over normal dispatch. The `EmergencyThread` class should print "Emergency: Car number n departing!" every 0.1 second for a total of six times, while the `JoinThread` class should print "Normal: Car number n departing" every 0.1 second for a total of six times and ensure that emergency dispatch takes priority.

|60 : 00

Click the virtual machine below to start practicing