Based on the following description of a shipment made by Union Parcel Shipments, identify all the states and exit transitions and then develop a state machine diagram.
A shipment is first recognized after it has been picked up from a customer. Once in the system, it is considered active and in transit. Every time it goes through a checkpoint, such as arrival at an intermediate destination, it is scanned and a record is created indicating the time and place of the checkpoint scan. The status changes when it is placed on the delivery truck. It is still active, but now it is also considered to have a status of delivery pending. After it is delivered, the status changes again.
From time to time, a shipment has a destination that is outside the area served by Union. In those cases, Union has working relationships with other courier services. After a package is handed off to another courier, it is noted as being handed over. In those instances, a tracking number for the new courier is recorded (if it is provided). Union also asks the new courier to provide a status change notice after the package has been delivered.
Unfortunately, from time to time, a package gets lost. In that case, it remains in an active state for two weeks but is also marked as misplaced. If after two weeks the package hasn't been found, it is considered lost. At that point, the customer can initiate lost-package procedures to recover any damages.