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

  1. Identify Nouns and Verbs from Requirements: Extract potential classes and operations. Example: POS system: Customer, Sale, Product, Payment.
  2. Identify Conceptual Classes: Remove irrelevant nouns; focus on key entities.
  3. Identify Attributes: Add properties of each class.
  4. Define Relationships and Multiplicity: Connect classes showing associations (1..*, 0..1).
  5. Refine Model: Remove redundancies and incorrect classes.

Example: POS System

ClassAttributesRelationship
ProductproductID, name, priceSaleLineItem -> Product
SalesaleID, date, totalAmountSale -> Customer (1..1)
CustomercustomerID, name
PaymentpaymentID, amount, methodSale -> Payment (1..*)
SaleLineItemquantitySale -> 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

  1. Cashier -> POS: startSale()
  2. Cashier -> POS: enterItem(productID, quantity)
  3. POS -> POS: calculateTotal()
  4. Cashier -> POS: makePayment(amount)
  5. POS -> POS: updateInventory()
  6. 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.

FeatureSequence DiagramActivity Diagram
PurposeShows object interactions over timeShows workflow of activities
FocusObjects and messagesActivities and control flow
NotationLifelines, messages, activationsActions, decisions, forks, joins
Time RepresentationVertical axis represents timeTime/order represented by flow
Use Case ExampleProcess Sale in POSATM Withdrawal process

Strategies for Finding Conceptual Classes

Question 5: Explain the three strategies to find conceptual classes (Library Management System).

  1. Noun-Identification Strategy: Extract nouns from requirements.
    Example: Book, Member, Librarian.
  2. Category-List Strategy: Use pre-defined category lists such as people, places, events, and things.
    Example: Book (thing), Loan (event), Member (person).
  3. Use-Case Strategy: Classes derived from use cases.
    Example: Borrow Book → Loan, Member, Book.