ICE 5– Learning Unit 2 Theme 4

Use the information below and create a sequence diagram for the use case.

Name: Buy Parts
Actor: Customer/Store Associate
Description: This use case describes the process used to buy parts at the auto parts dealer.
Successful Completion: 1. Customer requests auto part
2. Store Associate checks on availability of part
3. Part is available and customer pays cost
4. Customer receives part and stock is adjusted
Alternative: 1. Customer requests auto part
2. Store Associate checks on availability of part
3. Part is not available, and customer selects to order part or no part
4. Customer receives part and stock is adjusted (if alternate part ordered) or customer leaves with no part
Pre-Condition: Customer wants to purchase part
Post-Condition: None
Assumptions: None

The sequence diagram for the use case "Buy Parts" would look like this:

```
Customer->Store Associate: Request auto part
Store Associate->Store Inventory: Check availability of part
Store Inventory->Store Associate: Part is available
Store Associate->Customer: Pay cost
Customer->Store Associate: Receive part
Store Inventory->Update Stock: Adjust stock
```

Alternatively:

```
Customer->Store Associate: Request auto part
Store Associate->Store Inventory: Check availability of part
Store Inventory->Store Associate: Part is not available
Store Associate->Customer: Select order part or no part
Customer->Store Associate: Receive part (if alternate part ordered) or leave with no part
Store Inventory->Update Stock: Adjust stock (if alternate part ordered)
```