CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Student Projects (College Reports)

🎓 Student Projects (College Reports) · Class UML

ATM System Class Diagram

Classes for an ATM system: the ATM and its card reader, keypad, screen, cash dispenser and receipt printer, the bank, accounts, cards, customers and transaction types.

More Student Projects (College Reports) templates

Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.

Drawing diagram…

What this diagram shows

  • Abstract Transaction with Withdrawal, Deposit, Transfer, BalanceEnquiry
  • Composition for the ATM's hardware parts
  • PIN check on the Card class

Prompt used

Class diagram for an ATM system: ATM with CardReader, Keypad, Screen, CashDispenser and ReceiptPrinter; Bank; Account with SavingsAccount and CurrentAccount; Card; Customer; Transaction as an abstract class with Withdrawal, Deposit, Transfer and BalanceEnquiry subclasses. Show attributes, key methods and multiplicities.

Mermaid code
classDiagram
class Customer {
+UUID customerId
+string name
+string phoneNumber
}
class Account {
<<abstract>>
+UUID accountId
+string accountNumber
+Decimal balance
+credit(amount: Decimal) void
+debit(amount: Decimal) bool
}
class SavingsAccount {
+Decimal interestRate
+calculateInterest() Decimal
}
class CurrentAccount {
+Decimal overdraftLimit
+checkOverdraft(amount: Decimal) bool
}
class Card {
+string cardNumber
+Date expiryDate
+string pinHash
+int failedPinAttempts
+bool isBlocked
+verifyPin(enteredPin: string) bool
+validateExpiry() bool
}
class ATM {
+UUID atmId
+string location
+Decimal cashOnHand
+bool isOperational
+authenticateUser(card: Card, pin: string) bool
}
class CardReader {
+readCard() Card
+ejectCard() void
+retainCard() void
}
class Keypad {
+getInput() string
}
class Screen {
+displayMessage(message: string) void
}
class CashDispenser {
+Decimal currentCash
+dispenseCash(amount: Decimal) bool
}
class ReceiptPrinter {
+printReceipt(transaction: Transaction) void
}
class Bank {
+string bankCode
+string name
+authorizeTransaction(transaction: Transaction) bool
}
class Transaction {
<<abstract>>
+UUID transactionId
+DateTime timestamp
+TransactionStatus status
+execute() bool
}
class Withdrawal {
+Decimal amount
+execute() bool
}
class Deposit {
+Decimal amount
+execute() bool
}
class Transfer {
+Decimal amount
+string targetAccountNumber
+execute() bool
}
class BalanceEnquiry {
+fetchBalance() Decimal
}
class TransactionStatus {
<<enumeration>>
PENDING
SUCCESSFUL
FAILED
CANCELLED
}
Account <|-- SavingsAccount
Account <|-- CurrentAccount
Transaction <|-- Withdrawal
Transaction <|-- Deposit
Transaction <|-- Transfer
Transaction <|-- BalanceEnquiry
Customer "1" -- "*" Account : owns
Customer "1" -- "1..*" Card : holds
Card "*" -- "1" Account : linkedTo
Bank "1" -- "*" Account : manages
ATM "1" *-- "1" CardReader : contains
ATM "1" *-- "1" Keypad : contains
ATM "1" *-- "1" Screen : contains
ATM "1" *-- "1" CashDispenser : contains
ATM "1" *-- "1" ReceiptPrinter : contains
ATM "*" -- "1" Bank : connectsTo
ATM "1" ..> "*" Transaction : processes
Transaction "*" -- "1" Account : appliesTo
Transaction --> TransactionStatus : has

Inside this diagram

A class diagram with 18 classes and 19 relationships.

Classes

  • Customer: fields customerId, name, phoneNumber
  • Account: abstract; fields accountId, accountNumber, balance; methods credit(amount: Decimal), debit(amount: Decimal)
  • SavingsAccount: fields interestRate; methods calculateInterest()
  • CurrentAccount: fields overdraftLimit; methods checkOverdraft(amount: Decimal)
  • Card: fields cardNumber, expiryDate, pinHash, failedPinAttempts, isBlocked; methods verifyPin(enteredPin: string), validateExpiry()
  • ATM: fields atmId, location, cashOnHand, isOperational; methods authenticateUser(card: Card, pin: string)
  • CardReader: methods readCard(), ejectCard(), retainCard()
  • Keypad: methods getInput()
  • Screen: methods displayMessage(message: string)
  • CashDispenser: fields currentCash; methods dispenseCash(amount: Decimal)
  • ReceiptPrinter: methods printReceipt(transaction: Transaction)
  • Bank: fields bankCode, name; methods authorizeTransaction(transaction: Transaction)
  • Transaction: abstract; fields transactionId, timestamp, status; methods execute()
  • Withdrawal: fields amount; methods execute()
  • Deposit: fields amount; methods execute()
  • Transfer: fields amount, targetAccountNumber; methods execute()
  • BalanceEnquiry: methods fetchBalance()
  • TransactionStatus: enumeration; fields PENDING, SUCCESSFUL, FAILED, CANCELLED

Relationships

  • SavingsAccount inherits from Account
  • CurrentAccount inherits from Account
  • Withdrawal inherits from Transaction
  • Deposit inherits from Transaction
  • Transfer inherits from Transaction
  • BalanceEnquiry inherits from Transaction
  • Customer is linked to Account (owns)
  • Customer is linked to Card (holds)
  • Card is linked to Account (linkedTo)
  • Bank is linked to Account (manages)
  • ATM is made up of CardReader (contains)
  • ATM is made up of Keypad (contains)
  • ATM is made up of Screen (contains)
  • ATM is made up of CashDispenser (contains)
  • ATM is made up of ReceiptPrinter (contains)
  • ATM is linked to Bank (connectsTo)
  • ATM depends on Transaction (processes)
  • Transaction is linked to Account (appliesTo)
  • Transaction uses TransactionStatus (has)

Make your own diagram like this

Describe your own system in plain English and CloudSketch AI draws it in seconds. See all AI diagram generators.

Related templates

Use CaseStudent Projects (College Reports)

Library Management System Use Case Diagram

Who uses a college library system and what each of them can do: members, the librarian and the system administrator.

Database ERDStudent Projects (College Reports)

Library Management System ER Diagram

The database of a library system: books and their copies, authors, members, loans, reservations and fines, with keys and cardinality.

Data FlowStudent Projects (College Reports)

Library Management System Data Flow Diagram (Level 1)

How data moves through a library system: members and the librarian, the main processes, and the data stores they read and write.

Class UMLStudent Projects (College Reports)

Library Management System Class Diagram

The main classes of a library system with attributes, methods and UML relationships.

SequenceStudent Projects (College Reports)

Library Management System Sequence Diagram (Issue a Book)

The steps when a member borrows a book: checks, loan record and the copy status update.

Use CaseStudent Projects (College Reports)

Online Examination System Use Case Diagram

What students, examiners and the administrator do in an online examination system.