UML Modeling Techniques for POS and ATM Systems
Conceptual and Domain Modeling
Question 1: What is a Conceptual Model/Domain Model? Explain the step-by-step process to build it with a complete example from a POS system.
Answer:
Conceptual/Domain Model
A Conceptual Model is a visual representation of the real-world problem domain showing the key concepts (classes), their attributes, and relationships without considering system implementation.
Steps to Build a Conceptual Model
- Identify Nouns and Verbs from Requirements: Extract potential classes and operations. Example: POS system: Customer, Sale, Product, Payment.
- Identify Conceptual Classes: Remove irrelevant nouns; focus on key entities.
- Identify Attributes: Add properties of each class.
- Define Relationships and Multiplicity: Connect classes showing associations (1..*, 0..1).
- Refine Model: Remove redundancies and incorrect classes.
Example: POS System
| Class | Attributes | Relationship |
|---|---|---|
| Product | productID, name, price | SaleLineItem -> Product |
| Sale | saleID, date, totalAmount | Sale -> Customer (1..1) |
| Customer | customerID, name | – |
| Payment | paymentID, amount, method | Sale -> Payment (1..*) |
| SaleLineItem | quantity | Sale -> SaleLineItem (1..*) |
UML Diagram Representation
Customer 1 — * Sale 1 — * SaleLineItem * — 1 Product
Sale 1 — * Payment
Exam Tip: Label classes, attributes, and multiplicity clearly.
System Sequence Diagrams (SSD)
Question 2: Explain System Sequence Diagram (SSD) with all notations. Draw a sequence diagram for the “Process Sale” use case in a POS system.
Answer:
System Sequence Diagram (SSD)
Shows system events and interactions between external actors and the system for a single use case.
SSD Notations
- Actor: Represented by a stick figure.
- System: Represented by a rectangle box with the system name.
- Messages: Solid arrows from actor to system (events).
- Return Messages: Dashed arrows with return data.
Example: Process Sale (POS)
Actor: Cashier
System: POS System
- Cashier -> POS:
startSale() - Cashier -> POS:
enterItem(productID, quantity) - POS -> POS:
calculateTotal() - Cashier -> POS:
makePayment(amount) - POS -> POS:
updateInventory() - POS -> Cashier:
printReceipt()
Activity Diagrams and Notations
Question 3: What is an Activity Diagram? Explain all notations with symbols. Draw an activity diagram for an ATM withdrawal process.
Answer:
Activity Diagram
Represents the workflow or sequence of activities in a system.
Notations and Symbols
- Initial Node: Filled black circle.
- Activity/Action: Rounded rectangle.
- Decision Node: Diamond.
- Merge Node: Diamond.
- Fork/Join: Thick horizontal or vertical bars.
- Final Node: Circle with a border.
Example: ATM Withdrawal Process
[Initial] -> Enter Card -> Enter PIN -> [Decision: PIN correct?]
- If No: -> End
- If Yes: -> Select Amount -> Dispense Cash -> Print Receipt -> [Final]
Sequence vs. Activity Diagrams
Question 4: Differentiate between a Sequence Diagram and an Activity Diagram.
| Feature | Sequence Diagram | Activity Diagram |
|---|---|---|
| Purpose | Shows object interactions over time | Shows workflow of activities |
| Focus | Objects and messages | Activities and control flow |
| Notation | Lifelines, messages, activations | Actions, decisions, forks, joins |
| Time Representation | Vertical axis represents time | Time/order represented by flow |
| Use Case Example | Process Sale in POS | ATM Withdrawal process |
Strategies for Finding Conceptual Classes
Question 5: Explain the three strategies to find conceptual classes (Library Management System).
- Noun-Identification Strategy: Extract nouns from requirements.
Example: Book, Member, Librarian. - Category-List Strategy: Use pre-defined category lists such as people, places, events, and things.
Example: Book (thing), Loan (event), Member (person). - Use-Case Strategy: Classes derived from use cases.
Example: Borrow Book → Loan, Member, Book.
