4. State Diagram
Sơ đồ trạng thái
Explanation:
- The initial state is the home page of the online store.
- From the home page, the user navigates to the product page.
- From the product page, the user can either add the product to the cart or go back to the home page.
- If the user adds the product to the cart, they are taken to the cart state.
- From the cart state, the user can proceed to checkout.
- From the checkout state, the user chooses their payment method and is taken to the payment state.
- In the payment state, the user confirms their payment, and the state changes to processing.
- From the processing state, the online store requests shipment, and the state changes to shipment.
- In the shipment state, the online store either indicates that the shipment is in progress or that the shipment has been delivered.
- If the shipment has been delivered, the state changes to delivered, and the order is complete.
- If the shipment is still in progress, the state changes back to processing until the shipment is delivered.
- The final state is the home page, indicating that the order process is complete.