0% found this document useful (0 votes)
15 views2 pages

BC220410546 CS-504 Assignment No.2

The document outlines a sequence diagram for a vending machine system, detailing the interactions between the customer, vending machine, smart card reader, and item stock. It describes the steps involved in inserting a smart card, validating it, selecting an item, checking availability, purchasing, and dispensing the item. Additionally, it explains the symbols used in the sequence diagram, including actors, objects, messages, lifelines, and activation bars.

Uploaded by

reyanyounousrana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

BC220410546 CS-504 Assignment No.2

The document outlines a sequence diagram for a vending machine system, detailing the interactions between the customer, vending machine, smart card reader, and item stock. It describes the steps involved in inserting a smart card, validating it, selecting an item, checking availability, purchasing, and dispensing the item. Additionally, it explains the symbols used in the sequence diagram, including actors, objects, messages, lifelines, and activation bars.

Uploaded by

reyanyounousrana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Reyan Younous Rana

BC220410546

Assignment No. 02
Semester: Fall 2024
Software Engineering-1 (CS504)

Here’s a step-by-step breakdown for the sequence diagram:

Participants:

1. Customer: The user of the vending machine.


2. Vending Machine: Handles the process of selling items.
3. Smart Card Reader: Validates the card and updates the balance.
4. Items Stock: Checks item availability.

Sequence Diagram Actions:

1. Insert Smart Card

 Customer → Vending Machine: Insert Smart Card.


 Vending Machine → Smart Card Reader: Validate Card.

2. Validate Card

 Smart Card Reader → Vending Machine: Validity Status (True/False).

3. Choose Item

 Customer → Vending Machine: Choose an Item.

4. Check Item Availability


 Vending Machine → Items Stock: Check Item Availability.
 Items Stock → Vending Machine: Item Available (True/False).

5. Purchase Item (if available)

 Vending Machine → Smart Card Reader: Deduct Item Price from Card Balance.
 Smart Card Reader → Vending Machine: Updated Balance.

6. Dispense Item and Release Card

 Vending Machine → Customer: Dispense Item and Release Card.

Notations:

Sequence Diagram Symbols:

1. Actor: Represented as a stick figure (Customer).


2. Objects: Represented as rectangles (Vending Machine, Smart Card Reader, Items Stock).
3. Messages: Represented as arrows with labels showing the message content.
4. Lifelines: Dashed vertical lines showing the lifecycle of each participant.
5. Activation Bars: Thin rectangles on the lifeline showing an object is active during a
process.

You might also like